var doc = (Browser.Engine.trident)?
iframe.contentWindow:iframe.contentDocument;
Or is there a smoother Moo Way ?
Thanks in advance,
Jan
References to the window generated by the iframe and to the document loaded into the iframe can be obtained via the frames array using the name attribute.
window.frames[iframeName]
window.frames[iframeName].document
The frames array method of referencing has broad support, even among quite old browsers, as long as you attach a name attribute to the iframe. For best results, use both name and id.
For more up-to-date browsers, the document inside the iframe can also be referenced via contentWindow (IE win) and contentDocument (DOM) properties of the iframe element:
// IE5.5+ windows
document.getElementById(iframeId).contentWindow
document.getElementById(iframeId).contentWindow.document
or,
// DOM
document.getElementById(iframeId).contentDocument
An example demonstrates back and forth communication between the document containing the iframe and the document contained within it.
---
--
To unsubscribe, reply using "remove me" as the subject.
> > An example <http://www.dyn-web.com/tutorials/iframes/refs.php>demonstrates back and forth communication between the document containing
> > the iframe and the document contained within it.
> > ---
>
> > I have taken this shamelessly from here:
> >http://www.dyn-web.com/tutorials/iframes/
>
> > HTH
> > Roman
>