brianlange Posted May 13, 2011 Share Posted May 13, 2011 I am attempting to use the $.getJSON request from jquery to make a jsonp request. I want to use jsonp to circumvent the same origin restriction. I can't seem to get any data returned. Any help is greatly appreciated. $.getJSON("http://www.mysite.org/response.php?callback=?", function(data) { alert(data); }); response.php $response = array("t" => "test-data"); echo "(" . json_encode($response) . ")"; Link to comment https://forums.phpfreaks.com/topic/236342-jsonp-request-with-jquery/ Share on other sites More sharing options...
trq Posted May 14, 2011 Share Posted May 14, 2011 What does firebug have to say? Link to comment https://forums.phpfreaks.com/topic/236342-jsonp-request-with-jquery/#findComment-1215260 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.