EasyUI Forum
May 07, 2024, 01:24:50 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: About error event or timeout event of form plugin  (Read 10552 times)
linzfeng
Newbie
*
Posts: 3


View Profile
« 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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.
Logged
linzfeng
Newbie
*
Posts: 3


View Profile
« Reply #2 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");
                }
            });   
});
Logged
linzfeng
Newbie
*
Posts: 3


View Profile
« Reply #3 on: November 21, 2013, 02:13:19 AM »

my easyui version 1.3.4 and my jquery version is 1.9.1
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!