IE DOM Iframe Trouble
Hi all, I know this is really more of a DOM or IE DOM question than a js one but the js forum seems to be the most fitting...
I am working on a page where I have included an instance of FCK Editor (which is just a script that creates your standard Rich Text Editor interface inside a form).
What I want to do is call a function which retrieves the newly typed data (along with the formatting) and does something with it.
The "problem" is that FCK creates it interface inside an Iframe inside another IFrame. No problem for FireFox, Netscape, etc... It just a matter of a couple "getElementById()"s and "contentDocument"s. However IE does not support contentDocument. Instead IE puts all Frames (including IFrames) in the frames array. Which is fine, I can still navigate my way down the tree to my target Iframe with document.frames.frames... the trouble is, you cannot (or I can't figure out how) to access elements on the page inside the nested Iframes. I can access properties of the Iframes (such as location).
I'm thinking that this is how IE is "supposed" to work but is there any way that I can access elements inside a page inside of an Iframe or nested Iframes?
Someone PLEASE HELP!
OK So now I feel like a complete Tool. After working on this project for hours on end tonight, I hit the aforementioned roadblock. I guess I was suffering a little mental fatigue... The solution is actually ridiculously simple and anyone who has read this question is probably laughing, but In my defence, I've never claimed to be a js guy, mainly PHP and MySQL. But in case there is someone else with this situation here's the solution:
document.frames.frames gets me inside the target Iframe... now here is the DUH!... add .document.... yup that simple, document.frames.frames.document, from there you can retrieve title, body, and other child elements.
Thanks for laughing at me
Did you try using the contentWindow property?