Reputation: 1318
I am trying this tutorial ,it is working fine if server specify the call back object, like if server prints like this,
callback125([{"symbol":"DDD","price":10.610339195026,"change":0.053085447454327}]);
But my requirements are like, server can only print in pure JSON
form like this
[{"symbol": "ABC","price": 87.86,"change": -0.41}]
I tried to do so, json is retrieving but the callback method is not invoking, Is there any solution that we dont need to specify callback method ?
Upvotes: 0
Views: 102
Reputation: 7985
If your server only outputs json cross site request will not work using this approach.
You will have to use your own server to get the data and proxy it to your webapp or the server has to output javascript (calling your callback function).
Upvotes: 2