I am using
selectElement.attr('disabled', 'disabled');
to disable a dropdown in IE6, and using
selectElement.removeAttr('disabled');
to re-enable it. But it remains disabled and greyed out. Anyone has any ideas?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First thing to check: Your jQuery version.
I found this reference to a jQuery bug in IE6 with
removeAttronselectelements. This bug is in 1.6.2, and is marked as fixed. Make sure you’re on the latest version of jQuery, currently 1.7.2.Second thing to check: Your HTML.
I found this forum post, where it seems that IE6 requires the element to have the same
idandnameattributes for this to work.Third suggestion:
Try using jQuery’s
.prop()and.removeProp()methods instead of theattrmethods. (manual page: http://api.jquery.com/prop/ and http://api.jquery.com/removeprop/)Finally, I will echo what has probably been said to you many times already: please stop supporting IE6. The sooner we can all forget about this browser the better.
It’s worth pointing out that jQuery are planning to drop support for IE6, IE7 and IE8 (yes, all three of them) in v2.0, due out some time in the middle of next year. You’ll still be able to use older versions of jQuery, of course, but it does make the point about how far behind you are if you’re still on IE6.