Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove all option in a select statement

Status
Not open for further replies.

TechResearch

Programmer
Oct 4, 2002
13
CO
hi, I have some select box that change their contents when some change is made.
The thing is that I have to remove even the element that is selected.
I am using:
for i = 0 to Form.Select.options.length
Form.Select.remove(i)
next
but the element that was selected remains. How do I get rid of it?
 
problem with the logic. this fixed it

for i Form.Select.options.length to 0 step -1
Form.Select.remove(i)
next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top