How to embed a script so that it acts as a widget?
I have some information in my website which I need to include in my friends website but if I got through script inclusion I will fell into cross domain problem. Currently my website is based on ajax. Any idea or reference to achieve this?
Any 开发者_如何学Pythonhelp will be great!
Thanks,
KarthikUsing ajax you can use something called JSONP
jquery makes it easy - http://api.jquery.com/jQuery.getJSON/
You could either put it in an iframe if it is a stand alone widget, or use flash as a proxy to do the ajax and create a proper cross domain policy for the flash component.
精彩评论