Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to resize the <iframe> dynamically?

843840Jun 12 2008 — edited Jun 18 2008
hi all

i want to resize the <iframe> dynamically.
i tried like this --
<script language="JavaScript">
function calcHeight()
{

//find the height of the internal page
var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight;
//alert("Height-"+the_height);
//change the height of the iframe
document.getElementById('the_iframe').height=the_height;
}
</script>
<body onload="calcHeight();">
<iframe onload="calHeight();" src="abc.html"></iframe>

but it show access denied error on IE.
how to solve this error?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2008
Added on Jun 12 2008
5 comments
946 views