[CLOSED] Ext.Ajax.request: Failure due to javascript asynchronous nature problem

  1. #1

    [CLOSED] Ext.Ajax.request: Failure due to javascript asynchronous nature problem

    Hi,

    I am currently using Ext.Ajax.request to call a webservice which is occasionally slow due to many factors (database, network, etc).
    And in some cases, the Ajax request goes to FAILURE with no RESPONSE value while the webservice is still running, which causes "jsonValue.Message" to be null and javascript to show NULL error.

    (I recreated the scenario by adding breakpoints and slowing the webservice manually).

    Can you advice if its possible to make this request synchronous, or if the FAILURE trigger can be delayed further, or if there is steps I neglected to add to make RESPONSE value not NULL when the asynchronous problem happen?

    Thanks, J



    Ext.Ajax.request({
      method: 'post',
      url: "../WebifyService.asmx/MethodThatIsSlow";,
      headers: { 'Content-Type': 'application/json;charset=utf-8' },
      jsonData: { 'param': parameters },
      success: function(response) {
        //Success code goes here
      },
      failure: function(response, options) {
        var jsonValue = Ext.util.JSON.decode(response.responseText);
        alert(jsonValue.Message);
      }
    });
    Last edited by Daniil; Feb 02, 2012 at 8:35 AM. Reason: [CLOSED]
  2. #2
    Hi,

    You can set the .timeout property to a value greater than 30000, see

    http://docs.sencha.com/ext-js/3-4/#!...operty-timeout

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Hi Geoffrey,

    Thanks. It helped to resolve my issue. Please close this ticket.

Similar Threads

  1. Replies: 4
    Last Post: Feb 16, 2012, 2:05 AM
  2. Replies: 16
    Last Post: Oct 04, 2011, 5:17 PM
  3. ajax request failure callback function help
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Apr 30, 2010, 9:52 AM
  4. Coolite Ajax Request Failure (ASP.NET MVC)
    By AlphonsoT in forum 1.x Help
    Replies: 0
    Last Post: Jul 16, 2009, 8:10 PM
  5. [CLOSED] GridPanel.HideHeaders problem during ajax request
    By tansu in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 13, 2009, 4:56 AM

Posting Permissions