Klaus Hartl wrote:
> 
> Sean O schrieb:
>> Eriksen,
>> 
>> Try:
>> $("textarea.news01").attr("disabled", "disabled");
>> 
>> If you need to re-enable it later:
>> $("textarea.news01").removeAttr("disabled");
> 
> This does not work as expected, see my test page here (with checkboxes):
> http://stilbuero.de/demo/jquery/checkbox.html
> 
> If you use removeAttr the checkbox is not unchecked in Firefox. I assume 
> it's the same with disabled (all boolean attributes).
> 

Klaus,

You're right, this doesn't work for checkboxes.  But the example code given
by the OP was for a textarea, so I used that as my test case (which works
here in IE6 & FF 1.5.0.7).  "disabled=disabled" seems weird, but reference
w3schools:
http://www.w3schools.com/tags/tag_textarea.asp


_______
SEAN O
-- 
View this message in context: 
http://www.nabble.com/How-to-disable-a-form-fields-in-jQuery-tf2419205.html#a6745182
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to