Select Boxes - clear all options - except the last one
Update:I was a blithering idiot when I posted this. Read this post. If you're messing with dynamic select boxes here's a good reference. I ran into a problem. Apparently you can't remove the last option (makes sense - how can you have no options?). To make the select appear blank you end up doing something like this:
if (this.selectedDates.length == 0) document.getElementById(this.listName).options[0] = new Option("","");It just inserts a blank option.
1 Comments:
Hi,
Useful information. Very well explained. Thanks for sharing.
Cheers,
http://www.flowerbrackets.com/java-if-else/
Post a Comment
<< Home