I have an jQuery JSON request, that loads some JSON from another server (ex. foo.com):
$.getJSON(\"http://foo.com/json.php\",function(data) { alert(data); });
I'm pretty sure that in order to do cross domain calls like this you have to have a callback, it's what's needed to do JSONP.
here is some more info on jsonp http://www.insideria.com/2009/03/what-in-the-heck-is-jsonp-and.html
For jsonp to work you have to have a callback for the server to wrap the json string in. for example:
$.getJSON("http://foo.com/json.php?callback=?", function(data){});
here a callback function is generated by jquery and passed into the request, so it would be something like:
http://foo.com/json.php?callback=generatedFunction
then what's returned by the server should be:
generatedFunction("{key:value, key2:value2}");
where the parameter in that function is the actual json string.
in the php to return this it would be something like:
$callback = $_GET['callback'];
print($callback."(".json_encode($theobject).");");
More about cross-domain JSON throw JSONP and jQuery.