locked
Access denied error in IE 10 for iFrame contentDocument RRS feed

  • Question

  • Hi Team,

    As i am not facing any issue in the chrome and Mozilla or Safari, But i am getting access denied error in IE 10 where as in IE 8 it works fine.kindly provide a solution in this regard.

    var scriptFrame = $doc_0.createElement('iframe');
        scriptFrame.src = 'javascript:""';
        scriptFrame.id = 'xyz';
        scriptFrame.style.cssText = '; width:0; height:0; border:none; left: -1000px;' + ' top: -1000px;';
        scriptFrame.tabIndex = -1;
        $doc_0.body.appendChild(scriptFrame);
        frameDoc = scriptFrame.contentDocument;//=====Getting Access denied at this line as "UNDEFINED"
        if (!frameDoc) {
          frameDoc = scriptFrame.contentWindow.document;
        }
        frameDoc.open();
        var doctype = document.compatMode == 'CSS1Compat'?'<!doctype html>':'';
        frameDoc.write(doctype + '<html><head><\/head><body><\/body><\/html>');
        frameDoc.close();


    Regards,

    Satish M Hiremath

    9164141341 

    Tuesday, April 4, 2017 11:37 AM

All replies