PDA

View Full Version : So i need help



skygreen2031
07-16-2018, 02:16 AM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...jaxcontent.htm

3) Describe problem:

I was kindly provided with a modification for this script a while ago, specifically to be able to submit form data via a <select> drop-down list:

Code:

<form method="post" onsubmit="ajaxpage('submit.php?id=$ID&FORM1='+this.elements.FORM1.value+'&FORM2='+this.elements.FORM2.value,'$ID');return false;">

<select name="FORM1" size="3">
<option value="Value-1">Value-1</option>
<option value="Value-2">Value-2</option>
<option value="Value-3">Value-3</option>
</select>

<select name="FORM2" size="3">

<option value="Value-4">Value-4</option>
<option value="Value-5">Value-5</option>
<option value="Value-6">Value-6</option>
</select>

<input type="submit" value="submit" name="submit">

</form>

Everything still works fine, I just now need to be able to do the exact same thing with multiple checkboxes, I've tried a variety of approaches but none have worked.

Essentially something like this:

Code:

<form method="post" onsubmit="ajaxpage('submit.php?id=$ID&FORM1='+this.elements.FORM1.value+'&FORM2='+this.elements.FORM2.value,'$ID');return false;">

<input type="checkbox" name="FORM1[]" value="Value-1" />Value-1<br />
<input type="checkbox" name="FORM1[]" value="Value-2" />Value-2<br />
<input type="checkbox" name="FORM1[]" value="Value-3" />Value-3<br />

<input type="checkbox" name="FORM2[]" value="Value-4" />Value-4
<input type="checkbox" name="FORM2[]" value="Value-5" />Value-5
<input type="checkbox" name="FORM2[]" value="Value-6" />Value-6

Any ideas? Thanks.