I am trying to make a simple JSONP call to get a json file which is loaded on the remote server.
Here is my simple json file loaded on the server.
{
"login": [
{
"themename": "NO",
"themeId": "1"
}
],
"homePage": [
{
"themename": "NO",
"themeId": "1"
}
],
"transactionDetails": [
{
"themename": "NO",
"themeId": "1"
}
]
}
My Controller code which calls this file to get the data
Ext.data.JsonP.request(
{
url : 'http://xx.xx:8080/ThemeSelector.json',
callback : 'someCallback' ,
someCallback: function(success, result) {
var text = result.responseText;
var object = Ext.decode(text);
themeName = object['homePage'][0].themename;
}
});
I am getting the error "Uncaught SyntaxError: Unexpected token : "
I know that the response should be wrapped in the object but not able to make the exact correction in json file and my code. Any help please?
Thanks