Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access XML doc from another domain

Status
Not open for further replies.

celine7822

Programmer
May 7, 2001
17
SG
Hello!

I have a XML doc in my server and I have clients subscribing to my XML doc. On my clients' html, they access the XML doc using javascript.

..

xml.load("...

A javascript "Access is Denied" error is prompted.

Do I need to allow my clients to have the read permission to the folder in my server which contains the xml doc?

Regards,
Celine
 
This is really not an XML problem...
Yes, you net to have read rights in order to read the file. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Hi.

Here is a part of my code, I hope it helps:

...
var xmlHTTP=new ActiveXObject("MSXML2.ServerXMLHTTP");
xmlHTTP.open("GET"," xmlHTTP.send();
while(xmlHTTP.readyState!=4)
{}
var xmlDoc=new ActiveXObject("MSXML2.DOMDocument");
xmlDoc=xmlHTTP.responseXML;
...


best regards,

best regards,
Kirilla
 
Hi,

I'm have the same problem. When I test the code on my local PC the load() works fine. But on another domain, I get "Access is Denied".

Can you tell me what you did to solve this?

Thanks
G.F.
 
Hi G.F.

This is what i did.

Two domains, and
on the domainA.com, I have the load(). To access from domainB.com, I have a <iframe> tag on the page which I want to load the xml document.

say, index.htm on domainB.com

in the index.htm, I have include

...
<iframe src=&quot; ...>

...

It works for me and hope this solution works for you too.

regards,
Celine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top