Javascript for 100% height Iframe
I found a lot of sites giving incorrect code to do this so here is some java that worked for me.
<div id=”sitecontainer”>
<iframe id=”frame” src=”http://feeds.feedburner.com/Multimedia-GoogleNews?format=xml” width=”100%” frameborder=”0″ marginheight=”0″ marginwidth=”0″></iframe>
<script type=”text/javascript”>
function resizeIframe() {
var height = document.documentElement.clientHeight;
height -= document.getElementById(’frame’).offsetTop;
// not sure how to get this dynamically
height -= 20; /* whatever you set your body bottom margin/padding to be */
document.getElementById(’frame’).style.height = height +”px”;
};
document.getElementById(’frame’).onload = resizeIframe;
window.onresize = resizeIframe;
</script>
</div>