remove options

C

Crescionini Sascha

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
 
M

Martin Honnen

Crescionini said:
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
 
C

Crescionini Sascha

great!! thanx!

sascha :)

Martin Honnen said:
<form name="formName">
<select name="selectName"

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top