我有他们提供的以下constantcontact表单,在他们单击submit之后,它会打开一个constantcontact页面。但是,我希望他们点击提交后,它也会重定向到一个页面
<form name="ccoptin" action="http://visitor.r20.constantcontact.com/d.jsp" target="_blank" method="post" style="margin-bottom:2;">
<input type="hidden" name="llr" value="cjdttecab">
<input type="hidden" name="m" value="1101813878050">
<input type="hidden" name="p" value="oi">
<font style="font-weight: normal; font-family:Arial; font-size:12px; color:#000000;">Email:</font> <input type="text" name="ea" size="20" value="" style="font-size:10pt; border:1px solid #999999;">
<input type="submit" name="go" value="Submit" class="submit" style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:10pt;">
</form>发布于 2011-09-08 03:19:47
<form onsubmit="setTimeout(function() {location.replace('thanks.html');},100)"
name="ccoptin"
action="http://visitor.r20.constantcontact.com/d.jsp"
target="_blank"
method="post"
style="margin-bottom:2;">或者,转到此处http://community.constantcontact.com/t5/Documentation/Constant-Contact-Signup-Form-Generator-CCSFG/ba-p/25033下载表单生成器并填写成功url!
通过此页面找到
http://community.constantcontact.com/t5/User-Community/ct-p/userdiscussion
发布于 2011-09-08 03:39:28
既然你正在使用JSP来解析响应,你就不能在处理表单的代码末尾插入下面的内容:
response.sendRedirect("your/URL/here");然后按照正常的方式来做吗?还是说你需要用javascript来做这件事呢?
啊~我会调查这件事。
编辑:
下面的超时功能将起作用,但它假设最终用户启用了javascript。此外,100ms不是很长的等待时间--如果网络因为任何原因而延迟,帖子将不会被发送,所以它不会在100%的时间内工作,这是一个承诺。
要做到这一点,正确的方法是使用这个:http://community.constantcontact.com/t5/Documentation/Constant-Contact-Signup-Form-Generator-CCSFG/ba-p/25033
若要设置使用api的私有托管解决方案,请执行以下操作。这只需要很少的编程知识,而且您仍然可以为您生成的表单设置皮肤以匹配您的站点。它确实在PHP中运行,所以你的服务器必须支持它,但现在大多数都支持它。
https://stackoverflow.com/questions/7339289
复制相似问题