...

View Full Version : How can I array all select boxes?



questor
07-03-2006, 04:33 PM
This is what I'm trying, and I'm getting nothing out of it:


var allSelectBoxes = document.getElementsByTagName('<select>');
for (i=0;i<allSelectBoxes.length;i++) {
alert(allSelectBoxes[i]);
}

questor
07-03-2006, 04:54 PM
Fixed.


var allSelectBoxes = document.getElementsByTagName('select');
for (i=0;i<allSelectBoxes.length;i++) {
alert(allSelectBoxes[i]);
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum