• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need a little help on Boolean with Checkbox

mikysee

Senior member
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">
 
Back
Top