How can i get checkboxes values while transfering in second page?Javascript

suzannecandy

New Member
i have 5 checkboex. How can I get the value of them if any of them is checked and submited into the second page.here is my html code.\[code\]<form action="test.php" method="post" onSubmit="return checkCheckBoxes(this);"><input type="CHECKBOX" name="CHECKBOX_1" value="http://stackoverflow.com/questions/5337666/1">y<input type="CHECKBOX" name="CHECKBOX_2" value="http://stackoverflow.com/questions/5337666/2">o<input type="CHECKBOX" name="CHECKBOX_3" value="http://stackoverflow.com/questions/5337666/3">t<input type="SUBMIT" value="http://stackoverflow.com/questions/5337666/Submit!"></form>\[/code\]here is Javascrip code\[code\]<script type="text/javascript" language="javascript">function checkCheckBoxes(theForm) {if (theForm.CHECKBOX_1.checked == false &&theForm.CHECKBOX_2.checked == false &&theForm.CHECKBOX_3.checked == false) { alert ('Please make sure to check a checkboxe!'); return false;} else { return true;}}</script>\[/code\]
 
Top