is there a way I can loop through all controls on a page please ?
I.e. on a form submit, the code loops through 5 textboxes to check if any are blank (like with vb) - is this possible with javascript please ?
Thanks All :D
Printable View
is there a way I can loop through all controls on a page please ?
I.e. on a form submit, the code loops through 5 textboxes to check if any are blank (like with vb) - is this possible with javascript please ?
Thanks All :D
I think there is a getElementsByTag function, or something like that, in the DOM. It should return an NodeArray of all of the "input" Nodes.
Cheers both of you, Travis, do you know if that one's for NutScrape as well as IE before I start using it ?
Cheers again !
Sorry, it is DOM 3, which is still in Working Draft I think.
As to Netscape/Mozilla, they have vowed 100% compliance with no proprietary extensions. I would expect it to work when it is part of the recommendations. It is possible it works now, but it is not garunteed.
Now, if you have a page that "works" in IE but will not work in Netscape, then it is very likely that your page is using MS propreitary extensions.