View Full Version : Dynamic iFrame height won't work in Firefox

01-21-2005, 07:43 PM
Script: Iframe SSI script II
URL: http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

I'm using the latest version of this script with the firefox fix in it but can't get it to display correctly.

One of the page I load in the iframe is the result of a SQL query. In order for this page to display correctly, I've found that I needed to remove the
height:100% part of the style in order to display the entire result set (both in IE or Firefox). The iframe string now reads <iframe id="myframe" src="phonebook.asp" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="overflow:visible; width:900px; display:none"></iframe>

Because the height portion is missing, though, my main page no longer displays correctly in Firefox; the iframe barely shows the first line of that page. All works fine in IE. :confused: This page uses CSS layers... could that be the problem?

I can forward screenshots if this isn't clear enough.

03-26-2005, 12:00 PM
Hey, have you found a solution to it? I'm having the same problem. :( Let's collaborate.

03-26-2005, 05:51 PM
Hmmm it's highly likely the CSS layers are the cause of the problem, since layers may be interpreted out of context with the rest of the page, causing this script to not be able to add in the layers' height when determining how tall the iframe should be.

03-27-2005, 12:11 AM
I just tried the script in pages with no other styles, and it does nothing to the iframe in Firefox or IE. Without height:100% in the style it displays the iframe as only ~100px (for a massive page 10 times that length). With height:100% it displays the iframe as 100% of the browser window (in either browser). What gives? The script at its most uncustomised form doesn't even work for me. :(