Results 1 to 4 of 4

Thread: Sencha Touch AJAX Call Issue - Getting response Code 0

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    4
    Vote Rating
    0
      0  

    Exclamation Sencha Touch AJAX Call Issue - Getting response Code 0

    Hi All,

    I am using the following code for making a AJAX Call:

    Code:
    Ext.Ajax.request({
                        url: <Some HTTPS URL>,              
                        method: 'GET,
                        headers: {
                                 'Cookie' : <Some Authentication Cookies>
                        },
                            success: function(response, opts){    
                            //   More programming logic here
                        },
                        failure: function(response, opts){
                            console.log('Ext AJAX call failure with status code ' + response.status);
                            
                        }
                    });
    Most of the times it returns proper response but sometimes it is returning status code 0. I am sure that the URL I am calling is up and responding.
    If anyone has faced any similar issues then please let me know your findings, what could be the possible cause of this AJAX call to be failing that too with status code 0 ?

    Thanks in Advance.

    --Prashant

  2. #2
    Sencha User
    Join Date
    Jul 2010
    Location
    Switzerland
    Posts
    78
    Vote Rating
    0
      0  

    Default

    What platform is causing this problem for you?

    I have had this problem on iOS in phonegap, see this post:
    http://www.sencha.com/forum/showthre...l=1#post630760

  3. #3
    Sencha User
    Join Date
    May 2010
    Location
    Venezuela
    Posts
    12
    Vote Rating
    0
      0  

    Default

    when the device no iternet connection present, test your internet connection.

    1) disconect your internet, later execute ajax connections -> response.status = 0

  4. #4
    Sencha User
    Join Date
    Jul 2010
    Location
    Switzerland
    Posts
    78
    Vote Rating
    0
      0  

    Default

    I'll have to watch out for that then, thanks for the hint.
    Though getting response.status 0 is not an indicator for being offline.

Tags for this Thread

Posting Permissions

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