Results 1 to 2 of 2

Thread: How to find no internet connection in sencha 1.1??

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    9
    Vote Rating
    0
      0  

    Default How to find no internet connection in sencha 1.1??

    Hi,

    Ext.Ajax.request({
    url: 'http://www.google.com',
    success: function(response, options) {
    Ext.Msg.alert('Internet connection');
    },
    failure: function(response, options) {
    if(response.status == 0){
    Ext.Msg.alert('No Internet connection' + response.status);
    }

    }
    });
    this code is working fine in android sdk bt i want to know whether response.status=0 is a valid response for no internet connectivity in sencha touch without using phonegap. Please respond as soon as possible. And if it is not a valid response then please let me know the correct code.

    Thanks,
    Nikita

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,070
    Answers
    3976
    Vote Rating
    1394
      0  

    Default

    navigator.onLine will tell you if it's online or not.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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