[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-12 Thread Scott
my bad. I misunderstood your question. Ignore my response On Jan 11, 4:16 pm, Scott counterstre...@gmail.com wrote: you could submit the entire form using request. $(formid).request({ method: 'post',   onComplete:function(request){     alert(request.responseText);   } }); On Jan 11,

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread Hussein B
Thanks, it works for me. I have one further question: As I said, there is a checkbox at the end of each row. Now I know how to now if the checkbox is checked or not. What I want to do is if the checkbox is checked, I want to get the value of the second cell in the table. ID | NAME | DATE | STATUS

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread joe t.
Couldn't this also work (tweak to fit)?: var values = $('containerID').select('input:checked[type=checkbox] [name=checkGroup[]]').pluck('value'); i use that line for radio groups. Got it from: http://stereointeractive.com/blog/2008/06/05/get-radio-button-value-using-prototype/ -joe t. On Jan

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread Scott
you could submit the entire form using request. $(formid).request({ method: 'post', onComplete:function(request){ alert(request.responseText); } }); On Jan 11, 12:11 am, Hussein B hubaghd...@gmail.com wrote: Hey, I have a checkbox in front of each row in my table. Upon clicking on

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread joe t.
Er, a boo-boo on my part when compared to the source... He uses $$() to directly select the checkboxes, rather than starting at the parent container and using select(). i imagine it would work either way, but the original $$() is one step more direct. -joe t. On Jan 11, 7:36 pm, joe t.

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread joe t.
Ah, a little more tricky. Assuming: tr tdinput type=checkbox name=groupName[]//td tdCell 1/td tdCell 2/td tdCell 3/td /tr -SCRIPT- var values = []; $$('input:checked[type=checkbox][name=groupName[]]').each( function(el){ value.push(el.up().next(1).nodes[0]); } ); i don't really know if

[Proto-Scripty] Re: Collecting checked checkboxes

2010-01-11 Thread Al C
Take a look at either 1. getInputs()... (http://www.prototypejs.org/api/form/getInputs) or 2 . the $$ construct... http://www.prototypejs.org/api/utility/dollar-dollar If you choose the $$ option, it'll be easier if all of the checkboxes belong to the same class - e.g., class='first_checkbox'