Forum Moderators: open
<script language="javascript">
<!--
function calcHeight()
{
var the_height=
document.getElementById('submit_frame').contentWindow.
document.body.scrollHeight;
document.getElementById('submit_frame').style.height=
(the_height+10)+"px";
}
//-->
</script>
<iframe src="eew/index.html" onLoad="calcHeight();" scrolling="no" id="submit_frame" width="100%" frameborder="0">
Safari doesn't use the .contentWindow property. Instead you can use .contentDocument. Something like this should do the trick across all browsers:
var the_iframe = document.getElementById('submit_frame');
var the_document = (the_iframe.contentWindow ¦¦ the_iframe.contentDocument);
if(the_document.document) the_document = the_document.document;
var the_height= the_document.body.scrollHeight;