0

My Sencha Touch 2.1 web app works fine on iOS broswer, Google Chrome & desktop browsers. However, on native android browser I am not able to make any Ajax calls. It's just giving me an error:

Uncaught TypeError: Cannot read property 'connection' of undefined.

Web app works fine when using Google chrome on Android but not on native android browser. Phone's Android version is 4.0.3.

Has anybody experienced this before?

Thanks

Michael Mullany
  • 30,283
  • 6
  • 81
  • 105
Raj
  • 65
  • 3

2 Answers2

0

To handle Ajax calls in Android 4 you need to set the following:

Ext.Ajax.setDisableCaching(false);

Also set it in Ext.Loader, for example:

Ext.Loader.setConfig({
    enabled: true,
    disableCaching: false
});
OhmzTech
  • 897
  • 1
  • 5
  • 7
  • I tried using Ext.Ajax.setDisableCaching(false); however, it didn't work. Also, I don't use Ext.Loader in my application. Is there anything else, I could try? – Raj Jan 04 '13 at 23:53
  • Where is the undefined connection error coming from? Are you trying to use navigator to detect online status? – OhmzTech Jan 15 '13 at 19:18
-1

To make sencha touch ajax work, please check these thing:

  • Ajax works with the URL which has the same domain and protocol (http or https).
  • The server response content-type must be text/html.

Good luck.

Minh Nguyen
  • 490
  • 1
  • 3
  • 8