[thelist] Style iframe populated by innerhtml

Ben Morrison ben.morrison at dogstardesign.co.uk
Wed Jan 7 06:39:15 CST 2004


I don't seem to be able to access any of the content of my iframe.

I have a rich text editor that needs to be styled using my h1, p rules etc.

The iframe is populated using innerhtml (I know microsoft etc but couldn't
get createTextNode() to work in an iframe, or a rtf editor working on a mac
for that matter).

When I try and access the iframe using:

myIframe.document.body.getElementsByTagName("p");

It returns [object]

I can set the background colour fine, but none of the content.

Has anyone come across this before, or am I accessing the elements
incorrectly?

Ben




More information about the thelist mailing list