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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access denied, domains. Solution?

Status
Not open for further replies.

kloner

Programmer
May 15, 2000
79
AU
Hi all,

I have a question / problem with Javacsript. For my solution I am able to use ASP, client-side + server side javascript, jscript, ASP, XML, ADO etc

I am trying to access an XML recordset from a IFRAME named 'ACTIVE', where the src is from the IP of (.83).

Once the recordset is loaded it calls parent.getXML (this is in showReports.asp hosted on .87). This then grabs the XML from the 'ACTIVE' IFRAME and draws the report.

The problem is that because the page (showReports.asp) and the IFRAME src are on different domains, an error from the parent.getXML() function occurs.

This error is 'access denied' / permission denied. You can call a function across different domains.

I do however have access to the XML recordset and are able to change the code in it.

EG my file is like this ......

<XML RECORDSET HERE>
<STUFF>
</XML RECORDSET HERE>
&amp; end_recordset ***this is just a tag so I know where to chop it off.

<HTML>
<HEAD>
anything i want. currently...
function docload() {
parent.getXML()
}
</HEAD>
<BODY onload=&quot;docLoad&quot;></BODY>
</HTML>


A possible solution could be call a function to load a file (using MSXML) that loads a file on the Stats Server IP. Then could grap the temp file name that is produced, get the files source (XML recset), and somehow post it to the getXML function (but I would prefer not refreshing the page at all.).

But, I am unsure as how to do this. I cannot have the ACTIVE iFrame src on the same IP as the showReports.asp page.

Any suggestions of how to make this possible would be just great.

PS: its hard to explain this problem. When the ACTIVE iFrame and show reports where on the same IP .83 it was all fine, however this cannot be the case for final deployment.

kloner


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top