admin管理员组文章数量:1317898
I have a form loading inside my page and there is a button out side this form its function is to submit this form.
$('#MyForm').submit();
I want a way to write a submit plete function, means to know that the form successfully/pletely submitted.
I tried the jquery form plugin, but didn't work, i think because the submit e from a button outside the form.
anyone knows any different ways?
I have a form loading inside my page and there is a button out side this form its function is to submit this form.
$('#MyForm').submit();
I want a way to write a submit plete function, means to know that the form successfully/pletely submitted.
I tried the jquery form plugin, but didn't work, i think because the submit e from a button outside the form.
anyone knows any different ways?
Share Improve this question asked Jun 30, 2009 at 17:00 Amr ElgarhyAmr Elgarhy 69.1k70 gold badges192 silver badges310 bronze badges1 Answer
Reset to default 6Actually, you can use the jquery form plugin, just use the ajaxSubmit() method.
Documentation for the jQuery form plugin.
// setup the form, and handle the success
$('#myFormId').ajaxForm({
success: function() {
// do what you are looking to do on
// success HERE
}
});
// setup submission on some random button
$('#someButton').click(function() {
// submit the form from a button
$('#myFormId').ajaxSubmit();
});
本文标签: jqueryHow to write quoton form submit completequot using javascriptStack Overflow
版权声明:本文标题:jquery - How to write "on form submit complete" using javascript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742036260a2417309.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论