繁体   English   中英

按下提交按钮后,在同一颜色框中打开一个新表单

[英]open a new form in the same colorbox after pressing the submit button

我有一个在颜色框中打开了提交按钮的表单,我希望在按下“提交”后,一个新表单将显示到相同的颜色框中。 所以我有主页

<link media="screen" rel="stylesheet" href="colorbox.css" />
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript">
</script>
<script type="text/javascript">`
$(function()
{
$('#link_content').colorbox({opacity:0.3});
});
</script>

还有我打开ragister.jsp的部分

<a  href='ragister.jsp' id='link_content' ><h2>Register here </h2></a>

register.jsp具有带有提交按钮的表单,按下该表单后将调用process.jsp,其中process.jsp验证ragister.jsp的文本框是否正确(如果正确)是否保存在数据库中。不是process.jsp包含具有特定错误的另一种形式(error.jsp)

所以我想要的是将process.jsp和error.jsp表单显示在ragister.jsp的同一颜色框中

谢谢!

为此,您需要在iframe中强制加载颜色框。 我记得,您需要添加到.colorbox()都是'iframe': true但这还要求您指定确切的widthheight因为colorbox无法知道它创建的iframe中发生了什么。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM