PDA

View Full Version : Firefox problems with Iframe SSI script II



index
05-19-2005, 01:56 AM
I implemented this script and i get it to work 100% in IE, however Firefox chokes and shows me an ~100px high frame, although the content is MUCH longer.

http://lateamhandball.com/dev/test.php

I'm using :
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

any help woud be greatly appreciated!!
thanks

jscheuer1
05-19-2005, 02:51 AM
Just a thought, try changing this:


if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; to this:

if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight+"px";Untested, worth a shot.

And if that doesn't get it try increasing this number:


var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

index
05-19-2005, 03:10 AM
thanks, but that didn't work.
When changing 16 to 160 for example, the page did increase. But that would defeat the purpose of having it autosize.


var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

index
05-19-2005, 03:18 AM
that's interesting...every time (with Netscape 7 or Firefox 1.04) i click on a link inside the iframe, the outter frame grows by a certain amount
.Im assuming by the extra pixels for the firefox offset.

So if someone clicks around for 10min, i'll have a 100000px long page :confused:

doesn't happen with IE

jscheuer1
05-19-2005, 03:47 AM
Very strange, it is not a FF specific problem then. It could be because it is php. Did you try a demo of the page as regular html? The demo on DD here works fine but, it is html.

index
05-19-2005, 04:48 AM
yeah, tried that as well.
http://lateamhandball.com/dev/test.html

even removed the doctype header


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

index
05-25-2005, 03:37 AM
does anyone else have any ideas?
i really don't understand why it's behaving that way..and i can't find any other solution

jscheuer1
05-25-2005, 04:15 AM
The tried and true method is to start over with a demo install on pure html, make sure that is working properly. Then add your modifications/customizations one at a time until it breaks.

besson3c
05-29-2005, 06:25 PM
I've been using this same script on my website:

http://www.netmusician.org/links.php

The iFrames appear on all pages when you click on high bandwidth after the initial redirect. This problem is most visible in the Links section, however, which is why my URL points to this section.

The problem I have sounds like the exact opposite of what is being reported here, namely I get a whole bunch of extra space at the bottom of the window. I don't get this in any other browser, even lowly IE 6.

Strange... if you have any ideas of things I can try, I'm all ears, but I kind of suspect that there is nothing that can be done. It seems that Mox/Firefox's iFrame support is a little buggy.

ddadmin
05-30-2005, 09:33 PM
I've looked at some of the problems reported by Firefox users, and a lot of them occurs when the iframe contains a dynamic page (ie: php). It seems to throw dynamic resizing off in Firefox. I'm not sure there's a solution to this, at least I haven't had any success tinkering with the script.

besson3c
05-30-2005, 09:45 PM
I've looked at some of the problems reported by Firefox users, and a lot of them occurs when the iframe contains a dynamic page (ie: php). It seems to throw dynamic resizing off in Firefox. I'm not sure there's a solution to this, at least I haven't had any success tinkering with the script.

That's definitely the case for me. I didn't think there was a problem with your script. It works beautifully in other browsers, and sort of works in Firefox. When it fails it seems to yield no particular pattern.

_al_
06-11-2005, 12:32 PM
never use in the iframe document

html,body { height:100%; }

or the offsetHeight won't grow over 100%
and you'll never get your iframehight adjusted.

kamiKC
06-24-2005, 04:28 PM
Hi,

i also include the script in a project of mine...IE works fine, firefox also but with a scroll bar..but you can fix it with the extra height attrubute. -> page ist longer then its needed though.

But what about opera ? Opera supports iframe but when i try it out the iframe ist onlin ~100pixel height and has scrollbars..no resizeing ist taking place..

ist it possible to alter the javascript to have it reszied in Opera 8.0 ?

Any ideas ?

greetz

kamiKC