onclick表单提交,打开jQuery加载图像,直到表单提交完成 [英] onclick form submit, open jQuery loading image until form submit complete

查看:112
本文介绍了onclick表单提交,打开jQuery加载图像,直到表单提交完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能提供一些建议吗?

我正在使用一个托管的SAAS CMS解决方案,该解决方案使您能够使用Web应用程序系统创建基础应用程序.我创建了一个表单,供成员向自己的区域提交一堆图像和内容.一切工作都很好,除非通过表单提交的图像很大,表单提交并进入感谢页面"需要花费一些时间.我已经在使用jQuery UI将表单分为5个步骤,并使用jQuery facebox插件进行说明性弹出窗口.

I am using a hosted SAAS CMS solution that enables you to create basing apps with a web apps system. I have created a form for members to submit a bunch of images and content to their own area. Everything is working great except if the images being submitted via the form are large, it takes ages for the form to submit and go to the thank you page. I am already using jQuery UI to split the form in to 5 steps and using the jQuery facebox plugin for instructional popups.

我的问题是,提交表单时,显示加载的gif(在面板或其他建议的覆盖图中)的最佳方法是什么?

My question is, what would be the best way to display a loading gif (in facebox or in another suggested overlay) while the form is being submitted?

感谢您的帮助! 杰克

推荐答案

$('#myForm').bind('submit', function() {
  $('#ajax-loading').show()
});

将加载图片放入ID为"ajax-loading"且css为"display:none;"的div中

Put your loading image inside a div with id "ajax-loading" with css "display: none;"

这篇关于onclick表单提交,打开jQuery加载图像,直到表单提交完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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