Access Is Denied error accessing IFRAME on same domain

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • postman
    New Member
    • Nov 2008
    • 63

    Access Is Denied error accessing IFRAME on same domain

    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.domai n = '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.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    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.

    Comment

    • postman
      New Member
      • Nov 2008
      • 63

      #3
      In the environment I'm developing for, the servers are under a domain and we can navigate with either just the server name ("\\fileservern ame") or with the domain included ("\\fileservern ame.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.)

      Comment

      Working...