I am trying to make a user have to check the checkbox inorder for them to save their info.
This is part of my code in HTML. For some reason, whether the box is checked or not, I don't get the alert message. Thanks for any help.
function ValidateRate(){
var box=document.formrate.checksave
if (box.value != "on"){
alert("You must check the box before saving")
}
}
Check box to save this data per a new archive date
<input type=checkbox name="checksave" value="on">
Enter a Date (mm/dd/yyyy):
<input type="text" name="newDate" value="12/22/2006" maxlength="10" size="15">
<input type="submit" name="Submit" value="Submit">
This is part of my code in HTML. For some reason, whether the box is checked or not, I don't get the alert message. Thanks for any help.
function ValidateRate(){
var box=document.formrate.checksave
if (box.value != "on"){
alert("You must check the box before saving")
}
}
Check box to save this data per a new archive date
<input type=checkbox name="checksave" value="on">
Enter a Date (mm/dd/yyyy):
<input type="text" name="newDate" value="12/22/2006" maxlength="10" size="15">
<input type="submit" name="Submit" value="Submit">