I'm trying to make iframe height auto(100%), so searched lot of examples.
But the problem is... it does not working good in IE, only works in Chrome.
<div class="stockIframe ">
<iframe src="http://google.com" onload="autoResize(this)" height="100%" width="100%"></iframe>
</div>
html,body { height: 100% }
.stockIframe { width:100%; height:100%; }
.stockIframe iframe { width:100%; height:100%; border:0;overflow:hidden }
<script>
function autoResize(i)
{
var iframeHeight=
(i).contentWindow.document.body.scrollHeight;
(i).height=iframeHeight+20;
}
</script>
Anyone know how to fix it ?