Forum Moderators: open
in IE:
<iframe id="a"></iframe>
<script>
var a = document.getElementById('a');
alert(a.contentWindow.self);
</script>
i get [object]
and u think i can get a.self instead of a.contentWindow.self in opera 7?
and how do u document.write into a iframe?
opera7 do not present window object of iframe if it's hidden
<iframe name=... id=...>required text here</iframe>
<script>
var ifm = document.getElementById("iframeElementId");
alert(ifm.contentDocument); // null
if (self.iframeName == ifm) { // true for opera7 when iframe display:none
ifm.style.display = "block";
ifm.style.display = "none";
alert(ifm.contentDocument); // still null
setTimeout("alert(ifm.contentDocument);", 1000) // object [HTMLDocumentElement]
alert(self.iframeName == ifm); // false
}
</script>