PDA

View Full Version : alert response of restapi of the post



please
5 Sep 2012, 1:58 AM
hi all,
i posted few records to restapi so i got response of json data again like {errorrcode:'internal error'} , so i have to show this response as a alert if the response is error show as alert error success show as success

so i have parameter s to read the form record and operation how to do with this

scottmartin
5 Sep 2012, 1:41 PM
Please read the following:
http://www.sencha.com/forum/showthread.php?238414

Scott.

please
5 Sep 2012, 7:55 PM
thanks for the response, still its not working my json response data from post method {"error":"error while connecting"}

success: function (response) {

var jsonResp = Ext.JSON.decode(response.responseText);

Ext.Msg.alert("Info","UserName from Server : "+jsonResp);
},
failure: function (response) {
//var jsonResp = Ext.JSON.decode(response.responseText);
Ext.Msg.alert("Error"+jsonResp);
}

response.responseText is undefined giving output please help me out