kangax has led you astray! ;) $$('*[name="values[]"]').invoke('writeAttribute', 'checked', this.checked);
Cheers, Andrew On Apr 27, 3:28 pm, Domini <[EMAIL PROTECTED]> wrote: > 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("writ > eAttribute","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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---