I would like to either 1) set the iframe's height equal to the window height minus the iframe's top position (filling the window without invoking the verical scroll bar) or 2) resize the iframe to the height of the its src.

Yes, I've tested Dynamicly resizing an iFrame to the size of it's contents. It works in Firefox but is ignored in IE.

I have the iframe in the following table...

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
  <head>
    <title></title>
<style><!--
iframe {width:100%;}
table {padding:2;table-layout:auto;width:100%;}
td {vertical-align:top;}
--></style>
  </head>
  <body>
    <table border='1' summary=''>
      <tr>
        <td colspan='2'>
          Banner
        </td>
      </tr>
      <tr>
        <td rowspan='2'>
          Left
        </td>
        <td>
          <table border='1' summary=''>
            <tr>
              <td>
                Right
              </td>
            </tr>
            <tr>
              <td>
                <iframe id='IFcontent' name='IFcontent'></iframe>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </body>
</html>

use the window.screenY attribute to know how much space you have. Next it's only math.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.