开发者

fancybox form submit

I have a form that submits some content to a datab开发者_Python百科ase and it works fine.

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?

Thanks


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

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

EDIT

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>


You could do an ajax post request.

See: http://jquery.malsup.com/form/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜