Read this:
---

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 <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

On Mon, Apr 12, 2010 at 7:37 PM, berlinsurfer <[email protected]>wrote:

> Hi folks,
> I'd very much like to send a form within an iframe (using
> contentDocument or contentWindow).
> Therefore I have to distinguish between the beloved Internet Explorer
> and other (working) browsers. I've came across Browser.Engine.trident
> (being true for IE) and Browser.Engine.gecko (being true for FF).
> Does anyone know if only the IE makes the contentWindow approach ?
> Otherwise I could write:
>
> var doc = (Browser.Engine.trident)?
> iframe.contentWindow:iframe.contentDocument;
>
> Or is there a smoother Moo Way ?
> Thanks in advance,
> Jan
>
>
> --
> To unsubscribe, reply using "remove me" as the subject.
>



-- 
---
"Make everything as simple as possible, but not simpler."

- Albert Einstein

Reply via email to