Forum Moderators: open

Message Too Old, No Replies

IFrame in Netscape 6.2 ...

Accessing IFrame element and it's document...

         

bgrk

2:25 am on Apr 24, 2002 (gmt 0)



hi,
I want to access the document of an IFrame element in Netscape 6.2. The following code works well in IE 6.0, but fails in netscape.
var obj = window.frames['myIframe'].document;

In netscape, this is a null value. how can I get the document of an IFrame thru javascript in netscape?

please note that I am accessing the document of the embedded IFrame and not the actual doc.
Thanks in advance.
RK

MikeFoster

4:14 am on Apr 24, 2002 (gmt 0)

10+ Year Member



document.getElementById("myIframe").contentDocument;

Mozilla DOM reference for iframe.contentDocument [mozilla.org]