yeah something like that. but it will only traverse after submit was clicked.
i got it to work like this.
Code:
var the_form = document.getElementById("form1");
var str = "";
for ( var x=0; x<the_form.length; x++ ) {
temp = the_form.elements[x].name
if(temp=="col9"||temp=="col10"||temp=="col11"||temp=="col12"){
str+=conv(the_form.elements[x].checked);
}
so the output is many zeroes and ones. the names of the checkboxes depends on which column it belongs to. so if its at column 8 then it is named col8. that's why at first i was having a difficult time coz i was used to calling elements by unique names or IDs and this was something new to me.
i learned a different trick some time ago about putting '[ and '] after an element name so i could just easily get the values using a loop. couldn't apply it in this case though.
would it be a good idea to pass this with a POST method or GET? what do you advise? now that one problem is solved, another comes up. LOLz
i'll read those links in a while.. .
Bookmarks