Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vinod 2 posts 20 karma points
    Jul 16, 2009 @ 15:45
    Vinod
    0

    "Access Denied" java script error for a page inside Iframe

    We are having an IFrame html control which will load an aspx page from different website located in the same server. For the page inside IFrame, when user clicks on a button we have to display lytebox ( similar to customized pop up window using javascript) at the center of the screen( center of parent window).  

    Within the umbraco application I am getting javascript error message saying that "Access Denied." We debugged the issue and observed that it is because of accessing the window.parent.document was not accessible inside the page in IFrame. Can you please suggest us if there is any way of getting "window.parent.document" to work or any alternate way to overcome this issue.

    We are using umbraco 4.0.1.

    -Vinod

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jul 16, 2009 @ 15:53
    Sebastiaan Janssen
    0

    This is going to be very tricky, you might need to considering getting the content of the iframes using an underwater ajax call instead of using the iframe (if possible).

    Also look at this for a POSSIBLE solution, I have never tried this though.. Good luck ;-)

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jul 16, 2009 @ 15:53
  • Vinod 2 posts 20 karma points
    Jul 21, 2009 @ 07:45
    Vinod
    0

    Thanks for the reply. I tried different approaches but not successful. It looks like it is a security restriction from the browsers.

    Has any one tried this and executed the scripts across domains?

     

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 21, 2009 @ 08:17
    Peter Dijksterhuis
    0

    I think browsers are blocking this standard to prevent cross-site scripting.

Please Sign in or register to post replies

Write your reply to:

Draft