I can't for the life of me work out why my form has just stopped being submitted
I have a button with an on click which calls this function
but now I get an error
what's changed? it used to work, and the alerts for failure to complete required fields works fine, I just can't submit the damn form - why?
i've even tried giving the form an ID and using get ElementById and still no joy.
Any ideas?
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
I have a button with an on click which calls this function
Code:
function checkit(){
var msg = '';
if(document.guestgb.name.value == ''){msg = msg + '\nYour Name';}
if(document.guestgb.location.value == ''){msg = msg + '\nYour Location';}
if(document.guestgb.age.value == ''){msg = msg + '\nYour Age';}
if(document.guestgb.comments.value == ''){msg = msg + '\nYour Comments';}
if(msg != ''){
alert("Please complete the following field(s),\n" + msg);
}
else{
document.guestgb.submit();
}
}
but now I get an error
object doesn't support this property or method
what's changed? it used to work, and the alerts for failure to complete required fields works fine, I just can't submit the damn form - why?
i've even tried giving the form an ID and using get ElementById and still no joy.
Any ideas?
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.