What would that code look like?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That other domain/server needs to support JSONP, which basically wraps the JSON in a callback.
In jQuery, the call would look like this:
The actual response from the other server (if you looked at what was actually being sent) would look like this:
The jQuery getJSON method automatically handles JSONP when you supply the extra
callback=?. Just keep in mind some sites using different names likejson_callback=?. The important part is that you include it as part of the URL and don’t try to addcallback: '?'to thedatapart of thegetJSONfunction.