Tuesday 25 March 2014

Cross-domain scriptingJSON request_

Posted by Саша 21:11, under | No comments


Cross-domain scripting/JSON request ***? Cross-domain scripting/JSON request ***?

A client browsing a website on domain B needs to load a javascript on domain A and that javascript also needs to be able to load JSON getting served up via domain A.

On domain B, I just want to put a reference to a loader script on A that loads up the rest of my scripts (I have jQuery dependencies etc)..
<script src="domainA/jsLoader.js" ...>

So, to clarify: in jsLoader, I can put an alert() and it works, but it doesnt work if I try to do document.write('<script s'+'rc="domainA/someOther.js"> .... </sc'+'ript>') inside of this file. I can see the script tag in the dom, but it doesnt load the functions!

I tried to copy how google maps load up their api (see http://maps.google.com/maps?file=api&v=2...

Please, qualified answers only. If you haven't done this yourself and just think you can google the answer for me, then please do not answer - its of no use for me.

Thanks... //CT














0 коммент.:

Post a Comment