add the code so your body tag on the forum page (the page inside the iframe) so it looks like this:
Code:
<body onload="if(parent.IFRAME_size_to_content)parent.IFRAME_size_to_content('content')"> Now, on the page where the actual iframe tages are:
Put this in the header section of your page (between the <head> and </head> tags)
Code:
<script type="text/javascript" language="javascript">
function getIFRAME_doc_height(IFrameDoc) {
return (typeof IFrameDoc.height != 'undefined') ?
IFrameDoc.height + 16 :
(IFrameDoc.body && typeof IFrameDoc.body.scrollHeight != 'undefined') ?
IFrameDoc.body.scrollHeight + 30 :
null;
}
function IFRAME_size_to_content(iframe_ref) {
var IFrameDoc, oIframe = document.getElementById(iframe_ref);
if (typeof oIframe != null) {
if (oIframe.contentDocument) IFrameDoc = oIframe.contentDocument;
else if (oIframe.contentWindow) IFrameDoc = oIframe.contentWindow.document;
else if (oIframe.document) IFrameDoc = oIframe.document;
var hgt = getIFRAME_doc_height(IFrameDoc);
if (hgt) oIframe.style.height = String(hgt + 'px');
}
}
</script> And your iframe tag....
Code:
<iframe src="forumpage.php" width="600" hieght="600" name="content" id="content" scrolling="no"></iframe>
Changing the source and width to whatever you'd like
The height doesnt really matter, it should automatically adjust when the page loads due to the script.
Realistically though, an iframe is kind a silly way to do it
You'd be better off just doing a php include. Just place the php code block whereever you want the content to be loaded into on the page (in this case, in the TD).
Code:
<?php include("forumpage.php"); ?> Assuming your server supports php and then save your page that loads the forum as .php