HTML Option Disabled Attribute
A particular project I’m working on requires graying out options in a drop down box. I discovered the disabled attribute, which can be used as follows:
<select name="range">
<option value="7">last 7</option>
<option value="30">last 30</option>
<option value="60" disabled="disabled">last 60</option>
</select>
Normally you can just write ‘disabled’, but to be valid XHTML, you need the disabled=’disabled’ variant. The point is, this works fine and looks great in Firefox. The options are not selectable and are nicely grayed out.
The problem I discovered is that IE doesn’t support this. They apparently never have and, at least from what I saw, don’t even support it in IE7. So tonight I’ll be working up some hacks to get around this. How much time is lost due to having to pander to IE’s deficiencies?



http://www.lattimore.id.au/2005/07/01/select-option-disabled-and-the-javascript-solution/