Sunday, August 30, 2009

[jQuery] using cross domain scripting to embed HTML

I'm trying to set up a system similar to Google AdSense that allows other
websites to display some HTML content from my site on theirs. I've looked
at the show_ads.js file Google uses to display Ads but to be honest I've not
found it easy to decipher. I've also read that using a <script> tag to load
a JavaScript file from my site is simpler than trying to do do this with an
AJAX request. This
http://www.thefutureoftheweb.com/blog/cross-domain-json-without-xhr post
was helpful, but it discusses returning JSON rather than HTML.

Will someone please explain how this can be achieved using jQuery? A simple
example with code would be really appreciated :-)

BTW I know I could use an iframe to achieve something similar but this won't
give me the result I need because the content coming from my site will
contain a link back to my site and I want the link to be registered as an
inbound link to my site for SEO reasons.

Many thanks


--
View this message in context: http://www.nabble.com/using-cross-domain-scripting-to-embed-HTML-tp25211744s27240p25211744.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

No comments: