Javascript alert issue on form: Alert prompt keeps appearing -


can't provide link project due nda, hopefully, code i'll post more sufficient solve this.

i'm doing simple php contact form. nothing crazy. 2 text input fields , checkbox validate age. if leave form unchecked, can't enter contest.

i have validation working....to point. here's happening. when keep checkbox unchecked , try submit form, alert prompt saying i'm not 18 or over. js this:

if (!document.forms[0].age.checked) {      alert("sorry, must on 18 enter...please check on 18 box proceed");   }  

that works, , click "ok", alert prompt comes back! , i'm stuck in loop.

anyone know how can form work?

have tried

if (!document.forms[0].age.checked) {   alert("sorry, must on 18 enter...please check on 18 box proceed");   return false; }  

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -