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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deselecting all items in a drop down

Status
Not open for further replies.

nuct

Programmer
Sep 5, 2001
103
Anybody know how to do this in javascript, I can't seem to find anything in google.

Cheers,
Simon
 
Code:
document.forms['formname'].elements['dropdownname].selectedIndex = -1

-kaht

Weaseling out of things is important to learn. It's what separates us from the animals... except the weasel. - Homer Simpson (no, I'm not Homer)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top