Best Practice: Legitimate Cross-Site Scripting

Personally, I would call to that other domain on the server and get and parse the data there for use in your page. That way you avoid any problems and you get the power of a server-side language/platform for getting and parsing the data.

Not sure if that would work for your specific scenario...hard to know even with your verbose description...


You've got three choices:

  1. Create a server side proxy script.
  2. Create a remote script to read in remote dynamic HTML. Use a library like jQuery to make this easier. You can use the load function to inject HTML where needed. EDIT What I originally meant for example # 2 was utilizing JSONP, which requires the server side script to recognize the "callback=?" param.

  3. Use a client side Flash proxy and setup a crossdomain.xml file on your server's web root.


You could try easyXDM, by including very little code, you can pass data or method calls between documents of different domains.