DOM of an iframe

Hi,<br />
<br />
I got an iframe on my page and I would like to change some content inside that iframe dynamically.<br />
How can I get the DOM tree of that frame?<br />
I tried something like this:<br />
...<br />
<iframe id="ifr" src=http://www.webdeveloper.com/forum/archive/index.php/"..." ...><br />
</iframe><br />
...<br />
<br />
document.getElementById("ifr").contentDocument.getElementById(<some id from that document>)...<br />
<br />
This doesn't work however. Is the syntax wrong?<br />
<br />
thanks in advance<!--content-->This will work<br />
<br />
parent.frameName.document.getElementById....<br />
<br />
however,if the page opened in the ifram is an out of domain page then it will not work because of the browser security model<!--content-->Unfortunately that doesn't work for me.<br />
<br />
Mozilla gives error <br />
...frameName.document has no properties<br />
<br />
if I use ...frameName.contentDocument then it doesn't give that error but now ...frameName.contentDocument.getElementById(...) has no properties<!--content-->
 
Back
Top