I've got an Iframe in a table like:
Within the iframe there are some vertically "expandable/collapsable" div tags (using display: none/block). When the div tag's display attribute is altered, I set the Iframe's height = the iframe's document.body.scrollHeight.
In IE the content below the Iframe tag shifts down when the div tag is "expanded" and then shifts up when the div tag is "collapsed". In mozilla, the content shifts down, but not back up. Doing an alert of the iframes document.body.scrollHeight shows that in Mozilla the scrollHeight only increases and does not decrease. Besides scrollHeight, is there something else that I could use that would return the document's height that would work in Mozilla?
Code:
<table>
<tr>
<td>
<iframe id="results_iframe" src="results.cfm" margintop="0px" maringheight="0px" width="640px" height="120px" scrolling="no" frameborder="0"></iframe>
</td>
</tr>
<tr>
<td>
Some other content to display
</td>
</tr>
</table>
In IE the content below the Iframe tag shifts down when the div tag is "expanded" and then shifts up when the div tag is "collapsed". In mozilla, the content shifts down, but not back up. Doing an alert of the iframes document.body.scrollHeight shows that in Mozilla the scrollHeight only increases and does not decrease. Besides scrollHeight, is there something else that I could use that would return the document's height that would work in Mozilla?