Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

SCRIPT70: Permission denied in IE11 when calling java script on parent window from nested iFrame

$
0
0

in the iFrame I have:

window.parent.window.postMessage(

{'func':'postMessage','params':[action]},

document.referrer); 

And js on parent window:

if(window.addEventListener) {

window.addEventListener ("message", receive, false);

}

else{

if(window.attachEvent) {

window.attachEvent("onmessage",receive, false);

}

}

function receive(event){

var data = event.data;

if(typeof(window[data.func]) == "function"){

window[data.func].call(null, data.params[0]);

}

}

function postMessage(action){

 alert(action);

}
When I try this it generates above error.

If I open F12 developer tools, refresh the page, it works.

This works on all other browsers. How can this be fixed for IE 11?



Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>