iframe in a resizing table cell

liunx

Guest
I'm trying to do something but I can't work it out maybe you lot can...<br />
<br />
I have a table and in one of the cells is an iframe containing links to parts of my site. All I want is for the table cell to resize according to how many links are on the iframe page.<br />
<br />
Example:<br />
<br />
<html><br />
<body><br />
<table width="100%" height="100%" border="1"><br />
<tr><br />
<td><iframe width="100%" height="100%" frameborder="0" src=http://www.htmlforums.com/archive/index.php/"links.htm"></iframe></td><br />
</tr><br />
<tr><br />
<td>&nbsp</td><br />
</tr><br />
</table><br />
</body><br />
</html><br />
<br />
In this case, links.htm is the links page which is displayed in the top cell of the table. I want the top cell to resize automatically according to how tall the links.htm file is. Does anyone know how I can do this?<!--content-->This is untested but should work.<br />
In the links page put a javascript which fires onload. The javascript will detect the document height by:<br />
<br />
var h = document.body.clientHeight;<br />
<br />
Then you need to pass this value back to the main page and dynamically resize the table.<!--content-->Sorry but I'm not much of a javascript person, could you (or any one else) perhaps give me the code for this and where to put it if it's not too much to ask?<!--content-->
 
Back
Top