now, as soon as frame is loaded, its height is resized so removes the extra scroll bar. I tested this on chrome and ff, works well. Don't know about IE...
<head>
<script type="text/javascript">
function resizeFrame(frame){
var fSize = frame.contentWindow.document.body.scrollHeight;
frame.style.height = fSize + 'px';
}
</script>
</head>
<body>
...
<iframe height="100%" width="100%" src="url_for_page_to_load" onload="resizeFrame(this)" />
...
</body>
..
Cheers!
No comments:
Post a Comment