Title: About error event or timeout event of form plugin Post by: linzfeng on November 20, 2013, 08:35:05 PM I have read this post:
http://www.jeasyui.com/forum/index.php?topic=8.msg17#msg17 but if action url can't reach, there is no success event. my code: $("#frm").form( { url:'...', onSubmit:function(){ $.messager.progress(); return true; }, success:function(data){ $.message.progress('close'); ... } } ) So if success event can't fire, progress will alway shown and user can't do anything. In my environment, some computer's network is poor, so I often meet success event can't fire Title: Re: About error event or timeout event of form plugin Post by: stworthy on November 21, 2013, 01:11:09 AM The 'success' is called after the response has been returned from server, no matter what the result is. Due to the network issues, you may get the timeout information from 'success' function. So you need to detect if the data is what you expect.
Title: Re: About error event or timeout event of form plugin Post by: linzfeng on November 21, 2013, 02:07:15 AM The 'success' is called after the response has been returned from server, no matter what the result is. Due to the network issues, you may get the timeout information from 'success' function. So you need to detect if the data is what you expect. In my test, success not called!In my tomcat server, I create a html page with javascript below, and then visit the page. When submit form, 'success' is called. but when I stop tomcat, and submit the form, 'success' never called! The code: $(function(){ $("#frm").form({ url: "http://localhost:3292/test/test.htm", success: function (data) { alert("success"); } }); }); Title: Re: About error event or timeout event of form plugin Post by: linzfeng on November 21, 2013, 02:13:19 AM my easyui version 1.3.4 and my jquery version is 1.9.1
Title: Re: About error event or timeout event of form plugin Post by: stworthy on November 22, 2013, 12:19:41 AM Please download the updated form plugin from http://www.jeasyui.com/easyui/plugins/jquery.form.js and include to your page.
|