Hiding Options in Select

"Gale, David" <[email protected]>
Newsgroups gmane.comp.web.dom.wdf
Message-ID <[email protected]>
For a project, I need to have an option in a select, but which the user
can't see.  (It's selectable through javascript, so I don't want to just
remove the option entirely).  All examples I've seen online deal with
adding/removing options themselves, rather than showing and hiding them.
I can do this easily in FireFox, but I can't seem to in IE.

Example:
<html>
<head><title>Test</title></head>
<body>
<select multiple="multiple">
<option style="display:none">A</option>
<option>B</option>
<option style="visibility:hidden">C</option>
<option>D</option>
<option style="color:#f00">E</option>
<option>F</option>
<option>G</option>
</select>
</body>
</html>

In Firefox, option A doesn't show up at all; there's a blank where
option C ought to be; and option E is red.  In IE, however, options A
and C show up as normal.  Option E still turns red, so I know options
can receive *some* stylings.

Is it possible to do what I want, or so I need to code up a more complex
JavaScript solution?

Thanks,
-David


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/9rHolB/TM
--------------------------------------------------------------------~-> 

Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wdf-dom/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.