They must have unique IDs, or the page isn't valid and the code has no  
chance at all of working (unless you need the current property of the  
last one such).

When coding checkboxes, try this:

<input type="checkbox" name="box[]" class="box" id="box_1" value="1" />
<input type="checkbox" name="box[]" class="box" id="box_2" value="2" />
<input type="checkbox" name="box[]" class="box" id="box_3" value="3" />
<input type="checkbox" name="box[]" class="box" id="box_4" value="4" />
<input type="checkbox" name="box[]" class="box" id="box_5" value="5" />
<input type="checkbox" name="box[]" class="box" id="box_6" value="6" />

You don't have to use this format, I just find it easy.

Now you can get your collection of checkboxes like this: $$ 
('input.box') and iterate over them with each or another iterator.  
Your server will get an array called box containing only the checked  
elements, and if you want to attach a function directly to one of  
these elements, you'll have no trouble reverse-engineering the naming  
scheme to get the ID you want.

Walter

On Mar 9, 2009, at 9:52 AM, Bob wrote:

> They all have the same ID of  CODE, and different
> values.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to