Topic: Need updated resize Java script code or Iframe
Hello everyone,
I really hope someone can lend me a helping hand in regards to my issue. I followed the Step by Step How to embed a forum into your Vld Script directions and everything seems to work great, except for one thing. When I view the Punbb forum in Firefox, it doesn't automatically resize the height. It works perfect in Internet Explorer! So I'm not sure if the code needs to be updated or maybe I'm just doing something wrong but any help would be appreciated. I added the codes below so you can take a look.
THIS IS THE IFRAME CODE THAT I USED:
<iframe width="100%" id="iframe_id" name="iframe_name" src="http://www.mysite.com/forum/" scrolling="no" frameborder="0" ALLOWTRANSPARENCY="true" onload=resize_iframe();></iframe>
THIS IS THE RESIZE JAVA SCRIPT THAT I USED:
<script type="text/javascript">
<!--
moz=document.getElementById&&!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"].document.body.scrollHeight+(moz?mozHeightOffset:0)
}
// -->
</script>
Thanks