Hi,
I'm trying to validate a checkbox in the form and I'm not sure which property to use. At the moment, I have a checkbox called "termsandcond" and I'm trying to write a javascript validation script that checks to see if it is ticked or not.
function validate(){
var form = document.forms.bookingform;
if(form.elements.termsandcond.value = false){
alert('You must agree to the Terms And Conditions before booking.');
return false;
}
return true;
}
If anyone knows what properties I be using, or what I'm doing wrong, that would be really helpful.
Thanks in Advance
ForestTech