iFrame Javascript Minimum Frame Height Issue

C

chasquad

I have the following script and iFrame code on the main Internet
Explorer
page:

<td valign="top">
<p>
<script type="text/javascript">
<!--

moz=document.getElementById&&!document.all
mozHeightOffset=20

function resize_iframe(){
document.getElementById("I1").height=100 // required for Moz bug, value
can
be "", null, or integer
document.getElementById("I1").height=window.frames["I1"].document.body.scrollHeight+(moz?mozHeightOffset:0)
}
// -->
</script>

<iframe id="I1" name="I1" src="Products%20SubWebs/Products.aspx"
height="100%" width="100%" border="0" frameborder="0"
onload="resize_iframe()">
Your browser does not support inline frames or is currently configured
not
to display inline frames.
</iframe>
</td>


I'd like to modify the above javascript so that after it resizes the
iFrame
to match the size of the content that is being brought into the screen,
it
checks to see if the new iFrame height is below a minimum value. If
so,
then it resizes the iFrame again to meet at least the minimum height
specified (in the code). If the iFrame height is over the minimum
value
after the first resizing, then it should do nothing.

Thanks!
--
---------------------------------------------------------------
Charles L. Simpson
ACT, Inc.
---------------------------------------------------------------
Current Setup:
WSS 2.0 (no service packs)
Project Server 2003 SP1
SQL Server 2000 SP3a
FrontPage 2003 SP2
-----------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top