I suspect setProperty is more linked to attributes, while set is more
generic and linked to custom setters/getters, BUT I'm really not
sure :)

setProperty docs says:
"Sets an attribute or special property for this Element."
Where "special" really escapes me...

Can someone explain this clearly?
I think the doc should stress the difference

BTW I'm working with js-generate form controls. I'm going to get (and
study) this plugin (http://www.clientcide.com/docs/Element/
Element.Forms#Element-Properties:inputValue) or something like this
[http://forum.mootools.net/viewtopic.php?id=9794]

but If I should do it myself, how should I preferably set a checkbox
checked or unchecked?

$('mycheckbox').checked=true; // I don't like this, not sure is cross
browser, and breaks simmetry with the rest of the code

$('mycheckbox').set('checked','checked');
or
$('mycheckbox').setProperty('checked','checked');
or
$('mycheckbox').setAttribute('checked','checked'); //works the best,
but why?

(I'm going to write another Post about this in a few moments)

Reply via email to