Hello does anybody know how to resize the window of a pop up depending on the table height? The table height will vary as the content is coming from a database.
I have tried the following but does not work properly. Works fine in IE as long as the window is open and then closed before clicking on another pop up link. In Firefox the height calculations are wrong for some reason.
<html>
<head>
<script language="javascript1.1">
<!---
function ResizeWindow() {
var winX = 400;
var winY = document.getElementById('title').offsetHeight + document.getElementById('body').offsetHeight;
top.resizeTo(winX, winY);
top.moveTo(20,80);
top.focus();
}
//--->
</script>
</head>
<body onLoad="ResizeWindow()" class="popups">
<table id="title" width="100%">
<tr><td>TITLE</td></tr>
</table>
<table id='body' width="100%">
<!-- table rows go in here -->
</table>
</body>
</html>