A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Hide options in drop down
Joined: May 01, 2008
May 02, 2008 06:36:00
Hi Every one,
Is there any way to hide the options in a drop down.
As an example, I have a code as
In this I want to hide option STATE. I have tried display property of style (Please have a look at below code), its working in Firefox Mozilla but not in IE.
<OPTION style = "display:none">STATE</OPTION>
Thanks in advance.
SaurabhSri (SCJP 1.5)
Joined: Dec 20, 2006
May 02, 2008 07:05:00
document.getElementById("mySelect").options = null;
Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
I agree. Here's the link:
subject: Hide options in drop down
How to set a drop down value
How to do a Tool tip in select drop-down?
problem with drop-down box
Select tag 's selection should persist.
Getting the selected option
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014