I am new to Sencha and working on reading the response JSON data from the server and displaying in an alert, but on response, handleSuccess function is getting executed and getting the data in the alert to be as undefined. So I want Message data in JSON to be displayed in the alert. Thanks for any kind of help.
JSON data from server:
{"data":[{"Success":"FALSE","Message":"Data to be loaded","groupCount":0,"maxSeverity":10}]}
Ext.Ajax.request({
url: 'serverurl',
headers: { 'Content-Type': 'application/json;charset=utf-8' },
params: {
username: 'username',
password: 'password'
},
method: 'GET',
success: handleSuccess,
failure: handleError
});
function handleSuccess( response, opts )
{
var jsonData = Ext.decode(response.Message);
alert(jsonData)
}
function handleError( response, opts )
{
alert('server-side failure with status code ' + response.status);
}