fancybox表单提交 [英] fancybox form submit

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

问题描述

我有一个表单,可以向数据库提交一些内容,并且可以正常工作.

I have a form that submits some content to a database and it works fine.

现在,我想将其移至fancybox.问题是,当我单击fancybox上的提交"按钮时,页面将重定向到实际的表单页面,而不是停留在fancybox上.

Now I want to move it to a fancybox. The problem is that when I click the submit button on the fancybox the page redirects to the actual form page instead of staying on the fancybox.

关于如何阻止页面重定向的任何想法吗?

Any idea on how to stop the page from redirecting?

谢谢

推荐答案

如何将内容加载到fancybox中?如果您使用iframe方法,则该方法应保留在其中.

How are you loading the content into the fancybox? If you use the iframe method, it should remain within it.

请参阅此页面上的第4点,以将数据作为iframe加载 http://fancybox.net/howto

See point 4 on this page to load data as an iframe http://fancybox.net/howto

编辑

您需要将表单放在单独的页面中,然后使用指定的方法将该页面加载到fancybox中.例如,如果您创建了一个名为myform.asp的新页面,其中将包含您的表单和表单.然后,您将在页面上创建一个链接以包含您的fancybox,该链接将在iframe中调用myform.asp页面:

You need to put the form in a separate page and then load that page into the fancybox using the method specified. For example, if you created a new page called myform.asp which would contain your form and form. You would then create a link on your page to contain your fancybox which would call the myform.asp page in an iframe:

<a href="http://www.yourdomain.com/myform.asp" class="iframe">Fill Out Form</a>

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

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