Hi All,
I am trying to embed a PHPBB forum using an iframe into my site. I am having trouble getting the iframe to auto resize (height) based on the child content.
This link is the instructions for what I have been using to try and do this, but I must be misunderstanding part of the instructions:
http://www.daniweb.com/forums/thread96863.html#
Here is the link to the page I am working on:
http://69.42.58.10/~lion9332/test/forumtest.php
Thank you in advance for you help.
Paul
CS3 User.
Below is the thread I used the instructions from:
I have been getting some emails from people about this problem.. There is no need to contact me about this, I still haven't solved this problem, and to be honest, I don't think that it is possible, however, I have found a way around it, that looks just fine:
I am still using frames on my website, but I have taken away the borders and added transparency, and the code that triggers the onload resize javascript:
%26lt;iframe width=''800px'' id=''iframe_id'' name=''iframe_name'' src=''http://www.hyperoctave.org/forum/'' scrolling=''no'' frameborder=''0'' ALLOWTRANSPARENCY=''true'' onload=resize_iframe();%26gt;%26lt;/iframe%26gt;
I have also included an iframe resize javascript code, that is controlled by the child window.
%26lt;script type=''text/javascript''%26gt;
%26lt;!--
moz=document.getElementById%26amp;%26amp;!document.all
mozHeightOffset=20
function resize_iframe(){
document.getElementById(''iframe_id'').height='''' // required for Moz bug, value can be '''', null, or integer
document.getElementById('iframe_id').height=window.frames[''iframe_name''].documen t.body.scrollHeight+(moz?mozHeightOffset:0)
}
// --%26gt;
%26lt;/script%26gt;
and also added a code so that if the forum is the parent page, it is automatically replaced with the website around it.. (place this code in the top of index.php in your forum folder)
%26lt;script%26gt;
if (top.location == self.location)
{
self.location.replace (''http://www.hyperoctave.org/forum.php'')
}
%26lt;/script%26gt;