Well heres the code im using, can anyone either fix this code to make it work or suggest a better way of doing this, thanks.
function ValidateForm() {
if (document.submitform.email.value=="") {
alert("There is no email entered!"); return false;
}
if (document.submitform.email.value=="Enter your email...") {
alert("Please enter an email!"); return false;
}
if (document.submitform.email.str.indexOf(".") > 2) {
alert("Please enter a valid email"); return false;
}
if (document.submitform.email.str.indexOf("@") > 0) {
alert("Please enter a valid email"); return false;
}
return true;
}