View Full Version : revised iframe II Firefox snafu

01-28-2005, 12:46 AM
I read another post regarding this, but didn't see anything resolved. Is there a workaround? On Netscape and Firefox, the vertical scrollbars still appear.

I realize you can set the height of the longest page to eliminate them, but that seems unnecessary. I was hoping this script fixed that!

Any help is much appreciated :)

01-28-2005, 01:42 AM
What FF version are you using, an OS please? Also, in the future, please include a URL to the script for ease of reference, in this case, http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

01-28-2005, 06:27 PM
Sorry about that. FF 1.0 / N7.1 on WinXP and N7.2 Mac OS 10.3.7.

Hope this helps. I know the script example works on those browsers, so I'm not sure what I'm doing wrong. I'll check back to see if there are any updates. Thx.

01-29-2005, 12:51 AM
oops... forget that i mentioned netscape. i got carried away. i realize it's IE only.

01-29-2005, 01:36 AM
Hmmm I can't say for Mac, as I don't have access to one. But as far as FF1.0 WinXP, it should definitely work. Does the problem occur on our demo page as well, or after you've implimented on your page? I assume the problem again is the height of the content being a little too tall, hence a vertical scrollbar occurs within the iframe?

01-29-2005, 02:50 AM
i believe the demo worked fine. i always thought (or hoped) it didn't matter what height the external loaded pages were -- the iframe would accomodate whatever was being loaded into it (any length and obviously, without scrollbars!).

when you say 'content', are you saying the main page initially in the iframe? should it be a certain height or somehow relative to the external pages?

anyway, thx for the feedback :)

02-01-2005, 12:23 AM
It shouldn't matter the height of the external loaded pages, no, as long as all pages loaded into the iframe belongs to the same domain as the page containing the iframe script. So you can't load google.com in it for example and have the script resize based on the height of that page.

02-01-2005, 12:46 AM
well, they're only local pages. nothing external. the example is here:

if you click 'place an ad' (far right), the scrollbars appear. the new page being loaded is obviously a lot longer than the iframe, but i thought that's OK -- the iframe would accept any given height.

i've altered the iframe width to a pixel value to eliminate horizontal scrollbars but vertical bars still appear. can't think what i'm doing wrong! is it a doctype issue?

02-01-2005, 01:21 AM
Hmmm I see the problem in FF, though can't say now what the problem is. Try removing the doctype to rule that out. I'll have to try and find time if possible later this week to look at the problem more closely.

p.s: If you do use this script, please note our usage terms regarding putting our scripts in an external file (#2): http://www.dynamicdrive.com/notice.htm The credit notice should still remain in the visible source.


02-01-2005, 07:08 PM
well, i removed the doctypes and then alternated between 4.0 transitional loose.dtd and the standard 4.01 doctype and nothing seemed to change.

i do understand that above all, it all works best when the opening page (main iFrame) is preferably longer than the following loaded pages.

on IE it looks fine -- the next (shorter) page being loaded will fit perfectly. no iframe scrollbars and no shifting around to accomodate the pages scrollbars. but on FF 1.0, the same shorter page results in a lot of padding at the bottom. hope this all makes sense!

the feedback is certainly appreciated :)

02-02-2005, 07:02 PM
contrary to previous posts, i think this script does work! whatever it was i tweaked, it appears to now eliminate the iframes' scrollbars on FF 1.0 (as it should).

the one downside to FF (against IE) is how FF handles a pages' natural scrollbars. an example is here:


the whole page has to shift to accomodate the scrollbars of the loaded and lengthy external page. of course, if the contents of the iframe were long enough to begin with, this would change.

hope this helps!