Getjson And Invalid Label
I am trying to get json data from a url. Url is working ok in FF. I am trying code like this $.getJSON('http://testsite.com/1234/?callback=?', function(data){ //here i a
Solution 1:
It looks like the site you're fetching from doesn't support JSONP, with this URL:
http://testsite.com/1234/?callback=?
It's trying to use JSONP, but the server is returning a plain JSON response (not wrapped in a function).
With this URL:
http://testsite.com/1234/
It's not trying JSONP at all, and being blocked by the same-origin policy.
To fetch data from a remote domain, it needs to support JSONP so it can be grabbed with a GET request, so you'll need to either add support to that domain, or proxy the request through your own.
Post a Comment for "Getjson And Invalid Label"