I have project in which I have an elements from other domains. I'm using JavaScript to access first iframe window object into variable. Here is code :
var iframes = window.frames;
//grab first iframe
var ifrWindow = iframes[0].window; // Here is where I get **Permision denied**
ifrWindow.postMessage("hello",IframeDomain);
I'm getting 'Permission denied' only for IE8. I have no problems with Chrome, Firefox, Safari or later versions IE11, etc..
Anyone has experienced this kind of issue with IE8?
Have you tried contentWindow or contentDocument method?
Something like this should work:
Try out this function for IE8