i want to call a web service with AJAX, i used this code: Code:
Ext.Ajax.request({
url: 'http://localhost:4305/Service/test',
success : function(response) {
Ext.getCmp('res').setValue(response.responseText);
var user = eval('('+ response.responseText+ ')');
if(user !== "null") {
Ext.Msg.alert("Bienvenue Monsieur",user);
Ext.getCmp('res').setValue(response.status);
}
else {Ext.Msg.alert("Mot de passe ou login incorrecte","veuillez reeseyer");}
},
failure: function(response) {
Ext.getCmp('res').setValue(response.status);
}
});
it's work when i tested it in my browser (chrome), but it's return a 0 as status code when i tested it on an ANdroid Emulator. what shall i modify my code.