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) . ")"; Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/236342-jsonp-request-with-jquery/#findComment-1215260 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.