Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically removing all options from select element
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00293286
Message ID:
00293431
Views:
27
Thanks Michael,

That works very well. I didn't try that because in some docs it said that that property was readonly. This really helped my code length. Every other answer said you would have to loop through and removechild(0). :)

>>In DHTML is there a command to remove all options from a select object? Or should one use removechild method with:
>>document.all.optlist1.removechild() in a loop?
>>
>>TIA
>
>Remove all options from a select by setting the options.length property to zero. If optlist1 is the select object reference:
>optlist1.options.length = 0
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform