PDA

View Full Version : js, force box to be checked



mikefitz
26 Oct 2006, 06:31 PM
Hi, I need to force users to check a box before submitting a form on my godaddy hosted website. This is what I've come up with but it doesn't seem to work:


function checkscript() {
if (window.document.form.BoxChecked.checked=false) {
alert('Warning: Please agree to our terms of service.');
return false;
}
else if (window.document.form.BoxChecked.checked=true) {
alert('Thank you for your business!');
return true;
}

any idea why? sorry for the n00b question