Hi,
I decided to put each of the urls to html pages (that I need to print) to the separate IFRAMEs. So I have now complete document containing multiple pages inside, for printing.
But now I need to determine correct size of the document in each iframe to resize them (iframes) to height/width of the document.
Code:
<html>
<head>
<script language="JavaScript">
function SetFullSize()
{
var frame1 = window.document.getElementById("frame1");
//window.document.body.style.height = frame1.height + frame2.height;
frame1.height = frame1.document.body.offsetHeight;
frame1.width = frame1.document.body.offsetWidth;
}
</script>
</head>
<body onclick="SetFullSize();">
<iframe name="frame1" id="frame1" src="http://www.mail.ru" frameborder="0">
</body>
</html>
I left only one IFRAME to shorten code here.
I tested it in the IE 6.0.
When I click (to run SetFullSize) my IFRAME(s) get correct width, but height is about half less and I see vertical scroll bars on them.
How to get correct height of the document inside of the IFRAME ?
Thanks
Slava