I've been trying to figure out how to implement javascript on my registration page with no luck. I've read the documentation on wordpress about properly including js, have searched for relevant answers, and believe I have followed all steps correctly, however it's not working. Basically I call a .js file in functions.php, and it doesn't load in the page header.
Here is the implementation in functions.php (on line 156): http://pastebin.com/ZtK3Kw2E
Here is the js file contents:
function forceNumber(event){
var keyCode = event.keyCode ? event.keyCode : event.charCode;
if((keyCode < 48 || keyCode > 58) && keyCode != 8 && keyCode != 9 && keyCode != 32 && keyCode != 37 && keyCode != 39 && keyCode != 40 && keyCode != 41 && keyCode != 43 && keyCode != 45 && keyCode != 46)
return false;
}
Here is the page it is implemented on: https://jannus.org/wp-login.php?action=register
Again, it seems as if I followed the directions correctly but the page does not seem to be loading the file.
Any assistance on this would be greatly appreciated! Also, thank you for opening a stack forum for wordpress!
Kindly, Helena