Select box for loop(probably really simple)
Hi,
I am trying to get a select box to reset all its options to null. This is my code:
var theoptions = document.form2.dateselect.options
for (i = theoptions.length; i < 5; i++){
theoptions[i]= null;
}
I notice that the length of a select box will return 0, so I might be wasting my time calling it, but since it returns 0 every time I figure thats a solid starting point for the for loop. This method of setting each option to null by putting [i] in there doesn't seem to do anything. Any ideas?
cheers
interrupt
__________________
\'sync\' <cr>
The name specified is not recognized as an internal or external command, operable program or batch file.
|