Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrollHeight mozilla/IE

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
I've got an Iframe in a table like:
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>
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?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top