acord wrote :
Jim Moe wrote: acord wrote:
Is there such thing that an item in the listbox is disabled and is
appeared grey-out?
I assume you mean a <select> element?
To disable an option add the "disabled" attribute. It does not change
the color but does prevent the mouseover and click from having any
affect.
To change the color as well, add a style, "option.disable" for instance,
that sets the colors.
Hi, this only work with firefox, but I can't get it to work under IE6.
thanks
A
This has been reported in several pages of the wiki feedback pages on
MSIE 6 and MSIE 7. We're just like yourself, asking, waiting, expecting,
hoping that IE 8 will implement and support disabled for <option>.
"HTML 4 Support and spec violations
disabled attribute for option"
http://channel9.msdn.com/wiki/defaul...andardsSupport
"MSIE 6 and below do not support setting a specific option to be
disabled. Is this also fixed as part of the reworking of the select
element?"
http://blogs.msdn.com/ie/archive/200...76.aspx#514183
"When will Microsoft finally reach full support for HTML 4.01?
(...)
- label and disabled attributes for option and optgroup"
http://blogs.msdn.com/dmassy/archive...62.aspx#529968
"IE8 planning is already underway, and we appreciate the valuable
feedback we've been receiving on what we should be working on, as well
as the feedback we've received on IE7." Eric Law from Microsoft
http://blogs.msdn.com/ie/archive/200...76.aspx#515659
"Wow, congrats, you guys are finally where you should have been 7 years
ago. Quote from KunCong above
'Disable of OPTION is in the list of possible improvement in future IE
release.' "
http://blogs.msdn.com/ie/archive/200...76.aspx#522116
For MSIE 6, you can set the text color of the option node to gray as a
workaround.
Gérard
--
remove blah to email me