http://groups.google.com/group/mootools-users/browse_thread/thread/1c756f64d98e4f09#acb676781be02879
On Tue, Mar 17, 2009 at 10:33 AM, Vittorio Zamparella (via Nabble) < [email protected]<ml-user%[email protected]> > wrote: > > 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) > > > ------------------------------ > View message @ > http://n2.nabble.com/-Moo--difference-between-Element.set-and-Element.setProperty-and--setAttribute-tp2492698p2492698.html > To start a new topic under MooTools Users, email > [email protected]<ml-node%[email protected]> > To unsubscribe from MooTools Users, click here< (link removed) >. > > > ----- The MooTools Tutorial: http://www.mootorial.com www.mootorial.com Clientcide: http://www.clientcide.com www.clientcide.com -- View this message in context: http://n2.nabble.com/-Moo--difference-between-Element.set-and-Element.setProperty-and--setAttribute-tp2492698p2492756.html Sent from the MooTools Users mailing list archive at Nabble.com.
