RE: Referncing a JS generated iframe
"Seb Frost" <[email protected]> Thu, 20 Apr 2006 11:27:19 +0100
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Got it, I think:
document.getElementById('myiframe').contentWindow.document.getElementById('f
oo');
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf
Of Seb Frost
Sent: 20 April 2006 11:04
To: [email protected]
Subject: [wdf-dom] Referncing a JS generated iframe
If you generate an iframe on the fly it doesn't get entered into the
frames[] array, so you can't use that.
So I'm left with document.getElementById('myiframe'); That correctly
returns an object.
But if I have an element of ID "foo" inside that iframe how do I reference
that?
document.getElementById('myiframe').document.getElementById('foo');
doesn't seem to work. The second ".document" in that line of code seems to
give a reference back to the main page's document element, not the one for
that iframe. I've tried lots of things, but don't seem to be getting
anywhere!
This is a problem I've come across implimenting "the man in blue"'s
widgeditor.
cheers,
- seb
Unsubscribe
[email protected]
List info
http://www.quirksmode.org/dom/list.html
Yahoo! Groups Links
Unsubscribe
[email protected]
List info
http://www.quirksmode.org/dom/list.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wdf-dom/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/