i have a form that i want to be completed, validated, then directed to another file to process the database insert command. i had already created this form with a validation script that worked perfectly and was hoping to make "minor" adjustments to it. here's the script in part:
<HTML>
<head>
<script language="JavaScript" type="text/javascript">
function Validatemercy()
{
var method = document.mercy.ContactMethod;
var email = document.mercy.EmailAddress;
var address = document.mercy.PostalAddress;
if (method.selectedIndex < 1)
{
alert("Please provide your preferred method of contact.");
method.focus();
return false;
}
if ((method.selectedIndex==1) && (email.value == ""))
{
window.alert("Please enter your email address.");
email.focus();
return false;
}
return true;
}
// -->
</script>
</head>
<form name="mercy" method="post" action="
http://..../mercy.html"
onSubmit="return Validatemercy();">
<input type="hidden" name="id" value="NULL">
<input type=submit name="sent" value="Submit Form" language="JavaScript" onclick="return validate(this)">
<INPUT TYPE=RESET VALUE="Reset Form">
</FORM>
i have no problem with the validation, but after the form is completed correctly and resubmitted, an error message (page cannot be displayed; HTTP 405 - Resource not allowed IIS) appears.
i tried to insert header("Location: validate.php"); in the return true of my if statement, but i keep getting "page cannot be displayed."
can anyone help me?