javascript - Why isn't $.getjsonworking? -
i'm trying remote json data i'm unable to. temporary solution use http://whateverorigin.org/ it's no longer working me. i'm trying figure out why i'm unable remote json normal way $.getjson. here's code:
$.getjson("http://www.catholic.com/api-radio/6431?callback=?", function(result){ //response data in result variable alert(result); });
here's jsfiddle:
you making request jsonp (which javascript program 1 function call). server responding json (which claims html).
json (by itself) (and in case) isn't valid javascript, attempt run program errors. have seen if had looked @ javascript error console.
you'll need persuade service supply jsonp response or use some other means circumvent same origin policy.
Comments
Post a Comment