[thelist] XML and Javascript: 2 questions

Peter-Paul Koch pp.koch at gmail.com
Fri Oct 1 08:32:36 CDT 2004

> >>Can someone tell me if javascript can be used to load and parse an XML
> >>document if the javascript is on one web site (xyz.domain.com) and the
> >>XML is on another (abc.domain.com)?
> >
> >
> > JavaScript cannot access files that come from another server, so the
> > answer is No.
> Let's say you are using XmlHttp in Moz or IE (preferably with Sarissa). Can't you do that then?

This took me a while, but the answer seems to be No. I wrote a simple
XMLHTTPrequest script and tried to load a file from another server:
not allowed (Moz and IE).

So for the moment it seems XMLHTTPrequests are limited to what you can
get from your own server. If anyone can confirm or deny I'd be most

ppk, freelance web developer
Interactie, copywriting, JavaScript, integratie

More information about the thelist mailing list