Date: 09/03/07
(PHP Community) Keywords: no keywords
Hi there,
I have a sign up form which is working perfectly except for one thing; no matter how I phrase it, I cannot get an alert to display when a checkbox is unchecked. The code works perfectly for the textboxes that use it, but the checkbox won't behave. Is there a fundamental difference I'm missing here?
Here's two examples from the form; the company name part is working fine, but the terms simply won't register an alert.
Company Name: (*)
">
Please tick this box to confirm that you accept our terms and conditions.
function ValidateSignupForm(x){ if(x.company.value==""){ alert(""); x.company.focus(); return false; } if(x.terms.value==""){ alert("You must agree to our terms and conditions in order to join."); x.terms.focus(); return false; }
Any thoughts would be greatly appreciated. Thank you in advance.