aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Hide options in drop down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Hide options in drop down" Watch "Hide options in drop down" New topic
Author

Hide options in drop down

SaurabhSri Sri
Ranch Hand

Joined: May 01, 2008
Posts: 43
Hi Every one,

Is there any way to hide the options in a drop down.

As an example, I have a code as

<SELECT>
<OPTION>NAME</OPTION>
<OPTION>REG.NO</OPTION>
<OPTION>STATE</OPTION>
</SELECT>

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.

<SELECT>
<OPTION>NAME</OPTION>
<OPTION>REG.NO</OPTION>
<OPTION style = "display:none">STATE</OPTION>
</SELECT>

Thanks in advance.


Regards
SaurabhSri (SCJP 1.5)
Vilmantas Baranauskas
Ranch Hand

Joined: Dec 20, 2006
Posts: 89
You can remove options from JavaScript:


Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hide options in drop down