How can i get an array thet contains all checkboxes in document and submit them only if checked
Sep 24th, 2003 19:13
Eugene Loh, Bart G., Marja Delfos, selene rebane, [email protected]
With just this
<input type="CHECKBOX" name="name">
in my document
it submits only if"name" is checked.
All of the check boxes should have the same name:
<input type="checkbox" name="a" value="va">
<input type="checkbox" name="a" value="vb">
<input type="checkbox" name="a" value="vc">
<input type="checkbox" name="a" value="vd">
When the form is submitted it will send 'a' as 'va,vb,vc,vd', given
that all checkboxes were checked. If checkbox 1 and checkbox 2 were
checked, then 'a' will be 'va,vb'. Unchecked boxes are ignored.
Sorry, First post here, don't know how this site work yet.
Was looking for help or doing this getting the checkboxes value over to
the next page without using submit form, but couldn't find any, so i
var sizeOfBoxes = e.length;
var checkedValue = new String();
for (var i = 0;i < sizeOfBoxes; i++)
if (e[i].checked == true)
checkedValue += e[i].value + ',';
Then this is the link:
But does anyone know how to get rid of the last ',' ??, cause me still
Btw, that is the webby that I'm currently busy with.