I'm finishing the development of my time tracker php application.
After working a little with it (It's wonderful having something that suits perfectly your needs) i've noticed it would be a good thing having the possibility to set the number of lines to be shown in each page.
But it doesn't work when I put the code inside a js file that is linked in the same head section of the same php document.
The function is this one:
if(e.keyCode == 13)
document.cookie = "cookieName="+document.getElementById("lines").value+"; expires=Fri, 31 Dec 2049 12:00:00 UTC; path=/;";
If I use the "Inspect" option in the browser, I can see the message it appears when the function is located in an external js file is:
VM715 phpfilename.php:27 Uncaught ReferenceError: changeLiniesPerPagina is not defined
at HTMLInputElement.onkeypress (VM715 phpfilename.php:27)
onkeypress @ VM715 phpfilename.php:27
Thank you very much!
What I have tried:
Checked the syntax, put the code snippet in different js files...