javascript:在iframe中提交表单...帮助

编程入门 行业动态 更新时间:2024-10-28 15:34:28
本文介绍了javascript:在iframe中提交表单...帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

以下是我的情况:我使用了2个jQuery插件。 Shadowbox和验证(bassistance)。

我点击一个链接注册一个简报。该链接在shadowbox中打开一个表单。没什么大不了的。表单经过插件验证。

当表单经过验证并准备提交时,它不会。

submitHandler:function(form){$}这是我submitHandler选项(在validate插件中)的样子。 b $ b form.submit(); var s = window.parent.Shadowbox; s.open({ player:'iframe', title:'Thank you!', content:'www.somesite/includes/ thank_you_grid_3.php', width:270, height:110 }); }

帮助:) <如果你的表单有一个名字为'submit'的提交按钮,那么它将不会以编程方式提交。

。那么,至少在某些浏览器中。

谁知道为什么?...请评论;)

I can't believe I've never done this before....

Here's my situation: I am using 2 jQuery plugins. Shadowbox and validate (bassistance).

I click on a link to sign up for a newsletter. The link opens a form in a shadowbox. No biggie. The form is validated with the plugin.

When the form is validated and ready to submit, it doesn't.

This is what my submitHandler option (in the validate plugin) looks like:

submitHandler: function(form) { form.submit(); var s = window.parent.Shadowbox; s.open({ player: 'iframe', title: 'Thank you!', content: 'www.somesite/includes/thank_you_grid_3.php', width: 270, height: 110 }); }

Help :)

Thanks

解决方案

If your form has a submit button with name of 'submit' as well, it won't submit programmatically. Well, at least in some browsers.

Who knows why?.. Comment please ;)

更多推荐

javascript:在iframe中提交表单...帮助

本文发布于:2023-10-07 17:55:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1470093.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   javascript   iframe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!