John Eipe wrote:Is something wrong with document.forms[0]?
Not that I can see. The thing is most of us haven't used that format in so long, we are unlikely to catch the error. Using getElementById() is a good habit to get into. And since your code isn't working, you have to change something anyway. Might as well do so now.
I don't think that is the problem though. I think this line is wrong:
The parens tell JavaScript to execute initAll() when you run that line. At this point, the form doesn't exist yet. Whereas without the parens, it sets window.onload to be a pointer to the function to run later.