Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hide options in drop down

 
SaurabhSri Sri
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vilmantas Baranauskas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can remove options from JavaScript:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic