Results 1 to 3 of 3

Thread: submit form goes to failure section

  1. #1
    Sencha User
    Join Date
    Jan 2016
    Posts
    12

    Default submit form goes to failure section

    hi,
    i have a grid when i submit most of time go to failure section despite the sql query still running in server side
    Here the code
    HTML Code:
        NewTestReportForm.getForm().submit({ waitMsg: 'In progress....', params: { Action: 'SaveVersionTestScenario', product:product_id,version:version_id,test_plan:test_plan_id, grid:testsgrid}
                         , success: function (response, options) 
                         {                                             
                            CategoryStore.reload();
                          if (test_plan_id != undefined && test_plan_id == options.result.test_plan_id)
                         {
                          Ext.MessageBox.show({ title: 'Success', msg: 'The test plan is successfully saved', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO });
                          loadInterface(); 
                          store.reload();
                         }else
                         {
                         Ext.MessageBox.show({ title: 'Success', msg: 'A new test plan is successfully added.', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.INFO });
                        test_plan_id=options.result.test_plan_id;
                        loadInterface(); 
                        store.baseParams={Action: "GetVersionAllTestScenario",product:product_id, version: version_id, test_plan: test_plan_id};
                        store.reload();
    
                         }
    
                         }
                        , failure: function (response, options)
                        {
                            if (options.result)
                            {
                                if (!options.result.session) {
                                    Ext.MessageBox.alert('Session', 'Your session is down. You will be redirected to the login page.');
                                    mytime = setTimeout('Logout()', 5000);
                                }
                                else if (options.result.warning != '') {
                                    Ext.MessageBox.show({ title: 'Warning', msg: options.result.warning, buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.WARNING });
                                }
                                else {
                                    Ext.MessageBox.show({ title: 'Error', msg: 'Unable to save test scenarios.', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.ERROR });
                                }
                            }
                            else // always come here
                            {
                                Ext.MessageBox.show({ title: 'Error', msg: 'Unable to save test scenarios.', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.ERROR });
                            }
    
                        }
            });
        }
        else {
            Ext.MessageBox.show({ title: 'Warning', msg: 'Please fill in the required fields', buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.WARNING });
        }
    is there an idea to wait long query finishing ?
    Regards

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    About how long is your server taking to respond on average?

  3. #3
    Sencha User
    Join Date
    Jan 2016
    Posts
    12

    Default

    i don't know exactly but after i finsh my query i return a response with json format
    HTML Code:
       Response.Write("{success:true,session:true,warning:'',test_plan_id:'" + TestPlanID + "'}");

Similar Threads

  1. Replies: 5
    Last Post: 15 Nov 2013, 6:21 AM
  2. failure on form submit
    By rishi89 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 7 Jul 2010, 9:26 PM
  3. Ext.form.Action.Submit & Failure
    By nak1 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 21 Jul 2009, 10:08 AM
  4. submit a form: neither failure nor success
    By iBeb in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 21 Nov 2008, 3:05 AM
  5. form.submit failure handler
    By Tina G in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 30 Oct 2007, 8:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •