Reputation: 401
I am creating a test application in sencha touch that communicates with some other domain via jsonp request, but i just can't get the response back every time I get a Uncaught SyntaxError: Unexpected token :, my return json is absolutely perfect with no errors at all
also I can't change the remote function in the other domain that always returns me json object no script tag and method execution, is there any way to fix this Uncaught SyntaxError: Unexpected token : in the above scenario
Upvotes: 0
Views: 944
Reputation: 4114
Your server needs to return in the HTTP body something like
Sencha.json.callback1({example:'data'});
where Sencha.json.callback1 is taken from the "callback" query parameter.
Upvotes: 1