On Jan 11, 2006, at 9:26 PM, chris feldmann wrote:
On 1/10/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote:

+1. I covered a similar question here:
http://article.gmane.org/gmane.comp.web.dojo.user/2307/

To sum it up: "disabled" is one of the most screwed up attributes. Try
to avoid it, if possible.

I can't agree with this at all; it is often useful to disable and
re-enable form elements. You can use the regular DOM function
removeAttribute():

window.onload=function(){$("in1").removeAttribute("disabled");};
[...]
<input type="text"  disabled="true" id="in1"/>
[...]

Thanks! I mailed yesterday asking what to use instead, but message has not shown up here yet. Anyhow, that said, it is a rather confusing type of attribute (all boolean x/html attributes will behave in this way?), especially when I remember that I had already come across this issue some time ago, and still am surprised by it... good indication that it is screwed up.

mario

Reply via email to