I have dynamically loaded the values of checkbox using php, n m using AJAX in that page to call the processing page.
<form name="form1" id="form1" action="javascript:wait1();getPass('go.php?**place**='+ document.form1.place.value);" method="post" enctype="multipart/form-data">
<input name="place[]" type="checkbox" value="<?=$ro['article_title']?>" /><?=$ro['article_title']?>
As the checkbox consists of arrays, I do not get the values.
Plz help..
Thanks in advance.
Use the “array style” to access the form’s properties, like
form1['place[]']. As this is a checkbox, several values can be selected andform1['place[]']will return a node list. You could build the URL by traversing through the list:See a live example: http://jsfiddle.net/jrYBz/1/
But why do it like that? As you are POSTing the form anyway, why not just read the values via
$_POSTon the server side?