On Jan 10, 2006, at 7:57 AM, Bob Ippolito wrote:
On Jan 9, 2006, at 12:40 PM, mario ruggier wrote:

confused... using setNodeAttribute() to set the "disabled" attribute of an input html element seems to do nothing, but setting it directly works fine. I.e.

setNodeAttribute(input, 'disabled', true);
setNodeAttribute(input, 'disabled', false);

seems to not do anything, but the following does what I expect:

input.disabled = true;
input.disabled = false;

What am I missing?

Try it with svn trunk, I think 1.1 had a problem with that function.

Good, thanks. Thought it was something more mysterious.

Just tried with trunk head, and, replacing the packed file that I am using, it still does not work. If it is of any help, it is trying to set it to false that fails... i.e. trying to un-disable it. Setting it to true succeeds. FF on OS X.

Irrespective of this temporary issue, in this particular case the raw way of doing is clearer. What are the potential problems though with doing it that way? Are there x-browser glitches I am protected from?

Or, in general, what are the advantages of setting attributes via setNodeAttribute()? E.g. - can use a variable to specify the attr name (but can't I also do input[attrname] = true?)
- ???

Thanks, mario

Reply via email to