I found this here: stackoverflow.com/questions/1145850/
and expanded upon it to re-size width also...you just add this in your head:
<script type="text/javascript">
function getDocHeight(doc) {
doc = doc || document;
// stackoverflow.com/questions/1145850/
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function getDocWidth(doc) {
doc = doc || document;
// stackoverflow.com/questions/1145850/
var body = doc.body, html = doc.documentElement;
var width = Math.max( body.scrollWidth, body.offsetWidth,
html.clientWidth, html.scrollWidth, html.offsetWidth );
return width;
}
function setIframeSize(id) {
var ifrm = document.getElementById(id);
var doc = ifrm.contentDocument? ifrm.contentDocument:
ifrm.contentWindow.document;
ifrm.style.visibility = 'hidden';
ifrm.style.height = "10px"; // reset to minimal height ...
ifrm.style.width = "10px"; // reset to minimal width ...
// IE opt. for bing/msn needs a bit added or scrollbar appears
ifrm.style.height = getDocHeight( doc ) + 4 + "px";
ifrm.style.width = getDocWidth( doc ) + 4 + "px";
ifrm.style.visibility = 'visible';
}
</script>
Then make sure you have a unique id in your iframe and call the SetIframeSize:
<iframe src="source.html" id="uniqueid" onload="setIframeSize(this.id)"></iframe>