File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes <option> 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 "<option> " Watch "<option> " New topic


FY Hsieh
Ranch Hand

Joined: Aug 07, 2006
Posts: 73
Inside <select> tag I can have some <option> items. Is there a way for me to specify that a specified <option> is not selectable, i.e. when user selects this <option> item, there is no reaction from screen. This is different from disabling the entire <select>.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

Well, there's the <optgroup> element, but I don't think that's what you are after.

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Some browsers support disabled on an option, by most do not. Best bet is to remove it.

I agree. Here's the link:
subject: <option>
It's not a secret anymore!