在fancybox内提交表单并重定向页面 [英] Submit a form inside fancybox and redirect the page

查看:172
本文介绍了在fancybox内提交表单并重定向页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用fancybox在我的页面中显示表单,当表单提交时,我发现下一页显示在fancybox本身内,而不是导航到相关页面。

I am using fancybox to display a form in my page, and when the form is submitted, i see that the next page is displayed inside the fancybox itself, instead of navigating to the concerned page.

我正在调用一个像这样的fancybox:

I am invoking a fancybox like this:

<a href="login.php" id="fancybox_iframe" title="Please Login">
<img src="login.png"></a>

这是jquery代码:

This is the jquery code:

$("#fancybox_iframe").fancybox({
  'width'            : '480px',
  'height'           : '575px',
  'autoScale'        : false,
  'transitionIn'     : 'none',
  'transitionOut'    : 'none',
  'type'             : 'iframe'
}); 

当点击表单中的提交按钮并且满足验证时,我正在执行一些验证,表单在fancybox内部提交......但我希望fancybox关闭页面并将其提交到action url。

I am performing some validations when the submit button in the form is clicked, and when the validations are met, the form is submitting inside the fancybox itself... but i would like the fancybox to close and submit the page to the action url.

这怎么实现?

推荐答案

刚为表单标记添加了target =_ top它运作良好。

Just added target="_top" for the form tag and it worked well.

这篇关于在fancybox内提交表单并重定向页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆