I know about AJAX cross-domain policy. So I can\'t just call \"http://www.google.com\" over a ajax HTTP request and display the results somewhere on my site.
I tried
You will need to dynamically insert a script tag into the page that references the data. Using JSONP, you can execute some callback function when the script has loaded.
The wikipedia page on JSONP has a concise example; the script tag:
would return the JSON data wrapped in a call to parseResponse:
parseResponse({"Name": "Cheeso", "Rank": 7})
(depending on the configuration of the getjson script on domain1.com)
The code to insert the tag dynamically would be something like:
var s = document.createElement("script");
s.src = "http://domain1.com/getjson?jsonp=parseResponse";
s.type = "text/javascript";
document.appendChild(s);