
JavaScript Agree Box Check
This script will check that the user has checked the agree box in your form/contract etc.
Example
Script Source
<The Form >
<fieldset>
<legend>Agree Box</legend><form name="myForm" action="" onsubmit="return agreeBox(this)">
I agree that all information entered is true at time of submitting.
<p>
<input type="checkbox" name="boxAgree">
<input type="submit" value="Submit">
</form></fieldset>
<The JavaScript >
<script type="text/javascript">
<!-- Hide from old browsers
function agreeBox(myForm){
if (myForm.boxAgree.checked == false )
{
alert('Please verify that you agree that all information entered is true at time of submitting.');
return false;
}else
return true;
}
//End -->
</script>
Please let me know if this script was helpful to you.