Wonderful. )

But... what am I doing wrong?

Event.observe(window,"load",select_all_initialize);
function select_all_initialize()
{
        $("select_all").observe("click",select_all); // $("select_all") is a
checkbox
}
function select_all()
{
        // $$('name="values[]"') are checkboxes also.
        
$A(document.getElementsByName("values[]")).map(Element.extend).invoke("writeAttribute","checked",this.checked);
 //
This works.
        $$
('name="values[]"').invoke("writeAttribute","checked",this.checked); //
This doesn't.
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to