HighDots Forums  

remove options

Javascript JavaScript language (comp.lang.javascript)


Discuss remove options in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Crescionini Sascha
 
Posts: n/a

Default remove options - 09-26-2003 , 08:19 AM







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



Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: remove options - 09-26-2003 , 08:36 AM








Crescionini Sascha wrote:
Quote:
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/



Reply With Quote
  #3  
Old   
Crescionini Sascha
 
Posts: n/a

Default Re: remove options - 09-26-2003 , 08:44 AM




great!! thanx!

sascha

"Martin Honnen" <Martin.Honnen (AT) t-online (DOT) de> wrote

Quote:

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/




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.