Which function are you talking about?

Use the :checked pseudo-class in getCheckedValues.  (This also gets  
around the problem that you're not initializing memo for each call,  
so you'll get dirty data.)
getCheckedValues: function(seriesName) {
      return $$('input[name="'+seriesName+'"]:checked').pluck('value');
    }

... and, you may want to try a lower-case "id" in toggle().


TAG

On Sep 20, 2007, at 12:07 PM, [EMAIL PROTECTED] wrote:

>
> Hello,
>
> some other problem:( This code works fine under firefox but it dosent
> select the checkbox under ie7. Somebody an idea?
>
>>
>> i change the code a little bit to
>>
>> var CheckboxTools = {
>>    toggle: function(seriesID) {
>>        var boxes = $$("input[type=checkbox][ID^="+seriesID+"]");
>>        if (boxes.length) {
>>          var toState = !boxes[0].checked;
>>          boxes.each(function(box) {
>>            box.checked = toState;
>>          });
>>       }
>>    },
>>    getCheckedValues: function(seriesName) {
>>      return $$('input[name="'+seriesName+'"]').inject([], function 
>> (memo,
>> box) {
>>        if (box.checked) memo.push(box.value);
>>        return memo;
>>      });
>>    }
>> };
>>
>>
>
> ____________
> Virus checked by G DATA AntiVirusKit
> Version: AVK 17.7950 from 20.09.2007
> Virus news: www.antiviruslab.com
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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