PDA

View Full Version : 100% Height in IFRAME


Xirtam
07-26-03, 12:33 PM
ON my testpage (http://www.noorderpark.info/cms/index.php?option=displaypage&Itemid=61&op=page&SubMenu=) I am loading a page from another server using IFrame.
(everything is running in the Mambo CMS)

Between the head tags from the theme I am using I placed:

<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h = document.getElementById('blockrandom').contentDocu ment.body.scrollHeight;
document.getElementById('blockrandom').style.heigh t = h;
}
else if(document.all) {
h = document.frames('blockrandom').document.body.scrol lHeight;
document.all.blockrandom.style.height = h;
}
}
</script>


The page is loaded by:

<IFRAME src="http://www.nu.nl" scrolling="auto" FRAMEBORDER="0" BORDER="0" marginheight="10" marginwidth="0"
id="blockrandom" style="width:100%;"></iframe>

<script language="javascript"> setInterval("iFrameHeight()", 1000)
</script>

Question:
I would like to use scrolling="no" but the page should be loaded with 100% height (length) of the page so there is no scrollbar.

Is this possible and what is the code ??

This is also being discussed on the
Mambo Forum (http://www.mamboserver.com/fudforum/index.php?t=msg&goto=3117&rid=416#msg_3117)