mhackl
08-27-2009, 08:15 AM
I have added a script to my test server that works outside of vbulletin, but not within. The script allows an iframe to be dynamically adjusted by the size of the content contained within. This is used in a rss template.
headinclude:
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('fcontent').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('fcontent').height=
the_height;
}
//-->
</script>
RSS Feed "Body Template":
<iframe width="100%" id="fcontent" onLoad="calcHeight();" src="{feed:link}" scrolling="NO" frameborder="1" height="1">An iframe capable browser is required to view this thread.</iframe>
The iframe appears with the dimensions dictated in the "Body Template" and not the parent script. What vbulletin conflicts am I possibly incurring?
headinclude:
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('fcontent').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('fcontent').height=
the_height;
}
//-->
</script>
RSS Feed "Body Template":
<iframe width="100%" id="fcontent" onLoad="calcHeight();" src="{feed:link}" scrolling="NO" frameborder="1" height="1">An iframe capable browser is required to view this thread.</iframe>
The iframe appears with the dimensions dictated in the "Body Template" and not the parent script. What vbulletin conflicts am I possibly incurring?