I have a very simple setup with an IFrame:
<iframe height="550px" width="100%" border="0" id="iframeID" onload="javascript:proceed()">
</iframe>
The content of the frame is dynamically changed with JavaScript. Now after a page loads, i try to access it, but it won’t work!
var doc = frame.contentDocument ? frame.contentDocument : frame.contentWindow.document;
alert(doc);
alert(doc.body);
The first alert works just like it should, but the second doesn’t appear (and all further execution stops). There is no single property or element of the contentDocument i can reach. Can anyone help me to figure out the problem?