By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,261 Members | 1,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,261 IT Pros & Developers. It's quick & easy.

Access Is Denied error accessing IFRAME on same domain

P: 63
I have an IFRAME containing a page on the same domain as the parent (local network shared drive--not web server). If I put the full path to the page in the IFRAME's src, then I get the "Access Is Denied" error when trying to access elements on the child page.

Example: "//fileservername.example.com/folder/resource/childpage.html"

I've tried setting the domain on both the parent and child page (document.domain = 'example.com') but still received the error.

If I put just the sub-folder path in the IFRAME src(e.g., "resource/childpage.html"), then it works fine.

I'm trying to understand what the issue is because the child page may not always be in a sub-folder.

Thanks for any help you can provide.
Nov 7 '11 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,430
The whole .com syntax isn't normally used in naming a network folder/server. That's usually reserved for internet addresses. What you need to do is find the server's name. Also, if you're going to use the UNC path, then you may have to use the backslash instead of the forward slash.
Nov 7 '11 #2

P: 63
In the environment I'm developing for, the servers are under a domain and we can navigate with either just the server name ("\\fileservername") or with the domain included ("\\fileservername.example.com").

I tried both ways and it gives the same result. The slash direction makes no difference either. (I was using "/" for ease of use in javascript to avoid the escape character issue.)
Nov 7 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.