I have a series of div''s which contain input checkboxes.
What I''m wondering is how to determine using Prototype which ones are
checked.
This gives me all the inputs
$$(''input.buttonCheckBox'')
But I''m looking for some way to get the checked ones. I''ve
tried
adding attribute stuff in there but haven''t got it right yet.
Any help would be much appreciated!
Here''s what the code looks like.
<div id="button_1" class="mapButton">
<input id="cb_1" class="buttonCheckBox"
type="checkbox" />
</div>
<div id="button_2" class="mapButton">
<input id="cb_2" class="buttonCheckBox"
type="checkbox" />
</div>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
$$(''input.buttonCheckBox[checked=checked]'') may work.
On 13/11/2007, themire
<julian.keenaghan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I have a series of div''s which contain input checkboxes.
>
> What I''m wondering is how to determine using Prototype which ones
are
> checked.
>
> This gives me all the inputs
>
> $$(''input.buttonCheckBox'')
>
> But I''m looking for some way to get the checked ones.
I''ve tried
> adding attribute stuff in there but haven''t got it right yet.
>
> Any help would be much appreciated!
>
>
> Here''s what the code looks like.
>
> <div id="button_1" class="mapButton">
> <input id="cb_1" class="buttonCheckBox"
type="checkbox" />
> </div>
>
> <div id="button_2" class="mapButton">
> <input id="cb_2" class="buttonCheckBox"
type="checkbox" />
> </div>
>
>
> >
>
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
As of 1.6 we can safely use $$(''input:checked'')
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---