[thelist] XHR and the document.domain property

Marcus Bristav marcus.bristav at gmail.com
Tue Sep 4 14:57:41 CDT 2007


I used an iframe hack where I create an iframe in the correct domain,
then sets the document.domain property (so I can make javascript calls
between the frames) and finally makes calls from the top frame to the
parent iframe that in turn calls the other domain. A bit ugly but it
works :)

/Marcus

On 9/4/07, Bojan Tesanovic <btesanovic at gmail.com> wrote:
> Hi Bratisav,
>
> this is restriction of cross-domain policy for XHR, though there is a hack to
> overcome this using active script tag  and JSON,
> there are lot of articles about it google for
> "JSON active script tag cross domain",
> here is nice one
> http://blogs.nitobi.com/dave/index.php/2006/02/10/cross-domain-ajax-with-xml/
>
>
> Marcus Bristav wrote:
> > Using XmlHttpRequest (MSXML6) in IE I've been trying to do requests to
> > (for example):
> >
> > http://ws.test.com/data.xml
> >
> > from a page at
> >
> > http://bs.test.com/main.html
> >
> > but get illegal access. I've tried to set the document.domain property
> > in the HTML document object to no avail. Is there some other trick I
> > can do to get content at this semi-other domain or is XHR more
> > restricted than the normal DOM in this regard?
> >
> > Cheers,
> >
> > /Marcus
>
>
> --
> Bojan Tesanovic
> http://www.classicio.com/
> http://www.real-estates-sale.com/
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list