NonStopCoding Posted September 8, 2015 Share Posted September 8, 2015 (edited) Hi was wondering if anyone could try help me with this problem i am having. For some reason the js code i have is not working on my game but it works on js fiddle ill post the code see if anyone can help thanks in advance. Ok so what i have is a input field where users can type in the box for every character used it should show 100 * character next to the input box but for some reason its not working on my game but does on js fiddle I have tried to add the script to the part of the file with no luck also have tried adding it into the head tags of my header.php still no luck i have tried a external file and still no luck hehe can't figure why it wont work :( Edit: Forgot to mention its not showing anything on key up Code that handles the form http://pastebin.com/bS7ccQy3 Js Code http://pastebin.com/sJs1qhHh Js fiddle https://jsfiddle.net/AZKyn/ Edited September 8, 2015 by NonStopCoding Quote Link to comment Share on other sites More sharing options...
IllegalPigeon Posted September 8, 2015 Share Posted September 8, 2015 Have you tried using Chrome's debugging tools to see if you're getting any conflicts? Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted September 8, 2015 Author Share Posted September 8, 2015 only thing that pops up is Uncaught TypeError: Cannot set property 'onkeyup' of null Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted September 8, 2015 Author Share Posted September 8, 2015 (edited) Have you tried using Chrome's debugging tools to see if you're getting any conflicts? fixed it was posting the js code before the form which was causing it not to work now just need to make it so the $ sign instead of just numbers EDIT: nvm figured that out too thanks for the idea to check js console keep forgetting that thing is there haha Edited September 8, 2015 by NonStopCoding Quote Link to comment Share on other sites More sharing options...
Coly010 Posted September 9, 2015 Share Posted September 9, 2015 Also, remember that placement of script tags seems to make a difference, as well as that some functions won't work until the html is fully loaded Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted September 9, 2015 Author Share Posted September 9, 2015 thanks for tips :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.