我正在尝试使这个简单的 iContact 表单不重定向到成功页面或错误页面。我只希望我的访问者提交表单而不会被重定向离开页面或重新加载页面。
我一直在环顾四周,但我无法解决这个问题。这是我的 iContact 表单代码(我替换了我的帐户信息):
<style>
.link,
.link a,
.signupframe
{
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
.link,
.link a {
text-decoration: none;
}
.signupframe {
border: 1px solid #000000;
background: #ffffff;
}
.signupframe .required {
font-size: 10px;
}
</style>
<form method="post" action="https://app.icontact.com/icp/signup.php" name="icpsignup" id="icpsignupAAAA" accept-charset="UTF-8" onsubmit="return verifyRequiredAAAA();" >
<input type="hidden" name="redirect" value="http://www.icontact.com/www/signup/thanks.html">
<input type="hidden" name="errorredirect" value="http://www.icontact.com/www/signup/error.html">
<div id="SignUp">
<table width="260" class="signupframe" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top" align="right">
<span class="required">*</span> Email
</td>
<td align="left">
<input type="text" name="fields_email">
</td>
</tr>
<input type="hidden" name="listid" value="42379">
<input type="hidden" name="specialid:42379" value="O6IC">
<input type="hidden" name="clientid" value="954091">
<input type="hidden" name="formid" value="4616">
<input type="hidden" name="reallistid" value="1">
<input type="hidden" name="doubleopt" value="0">
<tr>
<td> </td>
<td><span class="required">*</span> = Required Field</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</div>
</form>
<script type="text/javascript">
var icpForm4616 = document.getElementById('icpsignupAAAA');
if (document.location.protocol === "https:")
icpForm4616.action = "https://app.icontact.com/icp/signup.php";
function verifyRequired4616() {
if (icpForm4616["fields_email"].value == "") {
icpForm4616["fields_email"].focus();
alert("The Email field is required.");
return false;
}
return true;
}
</script>