function validateForm() { var x = document.forms["frmContact"]["fquiz"].value; if (x != "6") { alert("Error: Incorrect answer for math captcha. Please try again."); return false; } }