I am trying to implement a field validation function:
function validate()
{
var result = true;
var field=document.problem_form.explanation.value;
if ((x==null) || (x.length==0))
{
alert(“Please enter an explanation”);
result = false;
}
return result;
}
Now if the field is empty, it will display the alert window, but it will also perform the FORM ACTION. I can’t figure out why. Is there some special situation that will make it perform the ACTION that I just happen to be in? Anyadvice would be great.
Thanks,
Jeff Krause