views:

112

answers:

2

Hi. I know it's not possible on the client to fill a DIV with content from another domain. However, I've used the Google Feeds code and it's pulling information from other domains into a DIV (no iframe) without resorting to server-side code, so I'm assuming somehow it's doable. Thanks.

+7  A: 

From the F.A.Q.:

If the AJAX Feed API is a JavaScript API, how does it access public feeds without violating the same origin security policy?

Google.com serves as a proxy to the outside feeds, so your client code only communicates with Google servers.

So, yeah, it's doing something server-side.

JacobM
Thought so :) ...
Skilldrick
+1  A: 
Babiker
Sure, but browser security prevents this if the script is served on a different domain.
JacobM
Can an AJAX call be for a URL from another domain with a query string and get the results as HTML and then fill a DIV with that? If so, is there an example of this? Thanks a million.
Alex
Nope, it doesn't matter if the AJAX call is to a URL that is intended to be a web service or one that's just a regular web page; you can't make AJAX calls to other domains.
JacobM