PATH://adammoro.net/code/javascript/

Random JavaScript: 100% Height IFRAME

Place the following code just below the IFRAME closing tag to make it auto-adjust to the height of the page.

			<iframe id="resizediframe" src="ENTER A URL HERE " width="100%" frameborder="0" marginheight="0" marginwidth="0"></iframe>
			<script type="text/javascript">
				function resizeIframe() {
				var height = document.documentElement.clientHeight;
				height -= document.getElementById('resizediframe').offsetTop;
				height -= 45;
				document.getElementById('resizediframe').style.height = height +"px";
				};
				document.getElementById('resizediframe').onload = resizeIframe;
				window.onresize = resizeIframe;
			</script>