the very last statement in your validateForm function should be "return true;"
Also you have a mistake in the code. You've got:
if (document.getElementById ("comments").value.length == 0)
alert ("Please enter a search field");
return false;
}
However you don't have an opening { on that IF statement. And the closing } we can see is for the function itself, not that IF.
So it's really doing it like this:
if (document.getElementById ("comments").value.length == 0) {
alert ("Please enter a search field");
}
return false;
}
i.e. it always returns false for your validate function. Change that last bit of the code like so:
if (document.getElementById ("comments").value.length == 0) {
alert ("Please enter a search field");
return false;
}
return true;
}