On 19-May-06, at 11:58 AM, mario ruggier wrote:

> On May 19, 2006, at 8:37 PM, Beau Hartshorne wrote:
>>
>> What's the best way to do the equivalent of element.checked = false;
>> with DOM/MochiKit?
>>
>> Beau
>
> I had run into similar problem some time ago, about how to really  
> unset a boolean attribute.
> Setting to false is not enough... best is to do something like:
>
> function uncheck() {
>     element.removeAttribute('checked');
> }
> function check() {
>     setNodeAttribute(element, 'checked', true);
> }
>
> mario

removeAttribute won't clear a checkbox that was checked by a user, it  
only works on checkboxes that have had the checked attribute set  
somehow. I'll take Bob's suggestion and use element.checked = false.

Beau

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to