PDA

View Full Version : Ajax call not working in sencha touch



shilpay
6 May 2011, 9:37 PM
Hi, I am working with both proxy and ext.ajax.request types. Here i am not getting the result.
In proxy it shows length is undefined.
In ajax.request, it goes to failure directly.
Ext.Ajax.request({
cache : false,
method: 'GET',
url:'http://api.yipit.com/v1/divisions/?key=Fz2EaW5aBJ8GKxPS&source=groupon',
success: function(html){
console.log(html['meta']['code']);
console.log(html['response']['tags'][0]['name']);
},
complete: function(){
},
failure : function(response){
Ext.Msg.alert('Ajax Error',response);
}
});

This is the ajax call. here it goes directly failure case. In jquery mobile its working fine. I face ajax call problems in sencha touch only.