Hi, I am trying to integrate a PHPBB forum into a wordpress page by using an iframe and a javascript that automatically resizes that iframe to the content's hight. I put the javascript code in the header of the theme, I think I did that right. But I also have to put some javascript in the post, and I think that that is where it goes wrong.
The code in the header:
<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h = document.getElementById('forumframe').contentDocument.body.scrollHeight;
document.getElementById('forumframe').style.height = h;
}
else if(document.all) {
h = document.frames('forumframe').document.body.scrollHeight;
document.all.forumframe.style.height = h;
}
}
</script>
The code in the post:
<iframe scrolling="no" width="800" frameBorder="0" src="http://www.jazzle.nl/forum/index.php" marginHeight="10" marginWidth="0" name="forumframe" border="0" title="forumframe" id="forumframe"></iframe>
<script language="JavaScript"> setInterval("iFrameHeight()", 1000)</script>
The script works fine except for when I use it within Wordpress. To show you the problem, here's my page: http://blog.jazzle.nl/?page_id=3
Thanks in advance