acess denied "doc = this.IFrame.contentWindow.document;"

Discussion in 'Javascript' started by gslim, May 9, 2006.

  1. gslim

    gslim Guest

    I am trying to implement the busybox sample from
    // From Mark Wagner

    When I get to this line I get an access denied error. Could someone
    give me an idea why this might be?

    Here is the entire function


    BusyBox.prototype.GetIFrameDocument = function()
    var doc;

    if( this.IFrame.contentDocument )
    // For NS6
    doc = this.IFrame.contentDocument;
    else if( this.IFrame.contentWindow )
    // For IE5.5 and IE6
    doc = this.IFrame.contentWindow.document; // ERROR HERE
    else if( this.IFrame.document )
    // For IE5
    doc = this.IFrame.document;
    // TODO: Confirm this should be the default
    doc = this.IFrame.document;

    return doc;

    END CODE::
    gslim, May 9, 2006
    1. Advertisements

  2. gslim

    VK Guest

    Cross-domain security. All pages have to be from the same domain where
    "the same domain" means that the part "" is
    identical. The differences can start only after ".com"
    VK, May 9, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.