Checking JavaScript is identical to checking HTML - just create it and open it into your browser, making sure you have JavaScript enabled. If you don't know whether you have it enabled, you probably do have it enabled.

Fortunately, if there are any syntax errors, most browsers feature an error console. In Firefox, it is under the tools menu, and in Internet Explorer, it generally appears as a little triangle at the bottom left of the screen when an error occurs.

If there is no reported error, or the error report doesn't help you solve the problem, there's a little trick to help pinpoint the location of the problem. When JavaScript encounters something it doesn't like, it just cancels what it's doing and moves on. So just place an alert somewhere in the code that isn't working. If the alert apears when the code runs, the problem is after the alert. If it doesn't, the problem is before it.

If the alert still works at the end of the code, then it's just that the code is doing exactly what you're telling it to do - but you're not telling it to do what you think you are telling it to do. At this point, you simply have to walk through your code step-by-step and make sure everything is doing what you intended. Sorry, I can't tell you what to look for, because it could literally be anything. I can tell you where to look though. If the code is executing to the end (i.e., the alert at the end of the code activates), then I'd look at any lines that display text. These are one of the few places that don't report errors and don't stop the code. It takes whatever it gets and sends it to the HTML part of the page, which in turn displays what it recieves no matter what it recieved. So that is a good place to start looking.

...And that's about it. If you absolutely can't find any errors in your code, then just sleep on it. A lot of the times looking at the problem with a fresh pair of eyes will solve the problem for you. I know it has for me. And finally, if even that fails, just send me the code! Send both the code and all invovled HTML pages and I'll do my best to fix the problem.