I’m trying to display a page inside an iFrame but I want the iFrame to dynamically change it’s height in relation to the height of the page within.
I have this bit of code in the iFrame Content page
[quote]
<script language=”JavaScript”>
parent.handleResponse(300);
</script>
and in the parent page
[quote]
<script type=”text/javascript”>
function handleResponse(msg) {
var x = document.getElementById(“myframe”);
x.height = msg;
}
</script>
Which passes the integer value of 300 to the function handleResponse and handleResponse then resizes the iFrame and everything works. But, I want to be able to change the 300 value to the height of the document which is proving a little more difficult.
something like body.document.height, but I know it’s not as simple as that. I’ve tried various different things like scrollHeight, client Height…and still no luck.
I’d appreciate any help you can offer.