Disabling Select Box Options in Explorer (not whole select)
Posted: Thu Nov 25, 2004 11:16 am
Hello all,
Pulling what little hair I have out on this one unfortunately.
Is there any way to disable an individual option (preferably through javascript) within a select box when browsing with Internet Explorer.
This works in Mozilla and Firefox...
In Internet Explorer they are all visible with no style handling. Ideally I would like to toggle a the option to be disabled or not using javascript.
Pulling what little hair I have out on this one unfortunately.
Is there any way to disable an individual option (preferably through javascript) within a select box when browsing with Internet Explorer.
This works in Mozilla and Firefox...
Code: Select all
<select name="Hello">
<option value=1 onclick="javascript:setFields(this);">Value1</option>
<option value=2 disabled>Value2</option>
<option value=3 style="display:none;">Value3</option>
<option value=4 style="visibility: hidden;">Value4</option>
<option value=5 style="color:blue;">Value5</option>
</select>