Sean O schrieb:
>
> 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
Hi Sean,
disabled="disabled" is ok for me - I belong to the people who deliver
their XHTML as real XML ;-)
Still you have to keep in mind that it is a boolean attribute and the
DOM interface for enabling/disabling is to set a boolean value.
And I furthermore encourage you to not rely on w3schools instead of the
real W3C specs.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/