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,
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
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
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
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.
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
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'