I have a select box with 4 values (a,b,c,d). I just want to disable 'c' inside the dropdown. I used disabled property, it is working in all browsers but not in IE6.
I want to make it work on IE6. Could you give me some fix for this issue.
thanks
I have a select box with 4 values (a,b,c,d). I just want to disable 'c' inside the dropdown. I used disabled property, it is working in all browsers but not in IE6.
I want to make it work on IE6. Could you give me some fix for this issue.
thanks
The disabled attribute for the option element is not supported in IE versions prior to 8.
The easiest thing to do would be to just completely remove that option from the select menu if you don't want anyone to select it. You should not be using the disabled attribute at all. It's simple: if you don't want someone to select it, don't put it in the list.
Unfortunately, I don't think it is possible. The work-around I've used in the past was to set the color of options that should be disabled to grey, and if one of those options were selected, I'd deselect it immediately using onchange().