By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

remove options

P: n/a

hello ng

is there an easy and fast way to remove/delete ALL options in a
dropdown-list?
if possible, i dont want to check the existing values, just ban all out of
this dropdown
to get a clean empty dropdown ;)

thanx for support

sascha
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Crescionini Sascha wrote:
hello ng

is there an easy and fast way to remove/delete ALL options in a
dropdown-list?
if possible, i dont want to check the existing values, just ban all out of
this dropdown
to get a clean empty dropdown ;)


<form name="formName">
<select name="selectName"

then you can delete options with
document.formName.selectName.options.length = 0

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

P: n/a

great!! thanx!

sascha :)

"Martin Honnen" <Ma***********@t-online.de> wrote in message
news:3f********@olaf.komtel.net...


Crescionini Sascha wrote:
hello ng

is there an easy and fast way to remove/delete ALL options in a
dropdown-list?
if possible, i dont want to check the existing values, just ban all out of this dropdown
to get a clean empty dropdown ;)


<form name="formName">
<select name="selectName"

then you can delete options with
document.formName.selectName.options.length = 0

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.