Thank you. I made that change but it still submits the form if the user doesn't fill out the fields. It should prevent them submitting the form if the fields aren't filled out AND print the red text at the top. Right now it does neither as far as I can tell (it submits before I can check if it prints red text).
It doesn't submit if I take this code out:
Code:
if (document.frmTest.name.value=="" OR document.frmTest.eml.value=="") {
newHTML = "<span style:color = 'red'> Please fill out all required fields.</span>";
document.getElementById('errortxt').innerHTML =newHTML;
result = false;
}
So I know part of the problem at least is contained in that code. Any other ideas out there?
|