
July 14th, 2010, 10:45 PM
|
|
Contributing User
|
|
Join Date: Apr 2005
Posts: 143
  
Time spent in forums: 2 Days 2 h 34 m 36 sec
Reputation Power: 11
|
|
Building get string with checkbox
I want to do this with a checkbox and am falling down on it...
Code:
var i=0, elem, qstr='';
while(elem=document.forms['form1']['quantity'+(++i)]){
qstr += (qstr.length ? '&' : '?') + 'quantity' + i + '=' + elem.options[elem.selectedIndex].value;
}
here is the checkbox
Code:
<input type=\"checkbox\" name=\"approved[]\" onclick=\"boxchk(this,6)\" checked=\"checked\" value=\"'".$j['id']."'\"/>
I(have tried a multitude of ways and seem to have trouble with it. Thanks very much for your help.
|