Ok for some reason after the update of Firefox it seems that my form keeps getting submitted when the user made a error on the form. I just want the page to reload so the user may try again. Because I have it so the submit button is a hit once only.
Here is the code:
-
<SCRIPT LANGUAGE="JavaScript">
-
-
function validateForm(form)
-
{
-
-
if (form.username.value == "")
-
{
-
alert('You did not enter a username!');
-
form.username.focuse();
-
location.reload();
-
return false;
-
}else{
-
-
-
if (form.security_code.value != "DOOM34K10")
-
{
-
alert('You did not enter the correct security code!');
-
form.security_code.focuse();
-
location.reload();
-
return false;
-
}else{
-
-
if (form.email.value == "") {
-
alert('We need to contact you through email!');
-
form.email.focus();
-
location.reload();
-
return false;
-
}else{
-
-
if (form.email.value == "someone@site.com") {
-
alert('I am sure as heck that your email is not what you entered!');
-
form.email.focus();
-
location.reload();
-
return false;
-
}else{
-
-
if (form.password1.value == "")
-
{
-
alert('You did not enter a password!');
-
form.password1.focuse();
-
location.reload();
-
return false;
-
}else{
-
-
if (form.password2.value == "")
-
{
-
alert('You did not enter the second password!');
-
form.password2.focuse();
-
location.reload();
-
return false;
-
}else{
-
-
-
if (form.password1.value != form.password2.value)
-
{
-
alert('The passwords you entered are diffrent!');
-
form.password1.focuse();
-
form.password2.focuse();
-
location.reload();
-
return false;
-
}else{
-
-
-
document.forms[0].submit();
-
return true;
-
}
-
}
-
}
-
}
-
}
-
}
-
}
-
}
-
-
</SCRIPT>