Dynamically size your iframe
-
If you embed an iframe and want it to dynamically resize when the window is resized, you can use the following example code:
<body onresize="getResized()"> <iframe name="I9" id="dgInclude" src="YOUR URL LINK" scrolling="no" frameborder="no" ALLOWTRANSPARENCY=TRUE> <p>Your browser does not support iframes.</p></iframe> <script>function getResized(){ var scaleFactor=.98; document.getElementById("dgInclude").width=document.documentElement.clientWidth*scaleFactor; document.getElementById("dgInclude").height=document.documentElement.clientHeight*scaleFactor;} getResized();</script> </body>
-
document.getElementById("dgInclude").width=document.documentElement.clientWidth*scaleFactor; document.getElementById("dgInclude").height=document.documentElement.clientHeight*scaleFactor;}