From: Zarkas on
Looking for a good crossbrowser script to resize my iframe according
to its content.
setting it to the documents offsetHeight in the frames onload event
seems to work most of the time but sometimes it a bit to short
especially if there's images on the content page.
tried the autoHeight jquery script and it seemed to work nicely, it
was just way to slow in cases, epscially if you clicked on a lot of
links quickly then it just froze the site.
any good suggestions?
From: SAM on
Le 6/13/10 2:59 PM, Zarkas a �crit :
> Looking for a good crossbrowser script to resize my iframe according
> to its content.
> setting it to the documents offsetHeight in the frames onload event
> seems to work most of the time but sometimes it a bit to short

Does that "works" with any navigator ?

> especially if there's images on the content page.

??? IE feature ?

And then anyway ?
If it is so big, that probably doesn't enter in the navigator's window
--> double lifts


> tried the autoHeight jquery script and it seemed to work nicely, it
> was just way to slow in cases, epscially if you clicked on a lot of
> links quickly then it just froze the site.
> any good suggestions?

Don't use iframes.

(for all a lot of reasons)

--
sm
From: Thomas 'PointedEars' Lahn on
Zarkas wrote:

> Looking for a good crossbrowser script to resize my iframe according
> to its content.

This nonsense has been discussed before.

> setting it to the documents offsetHeight in the frames onload event
> seems to work most of the time but sometimes it a bit to short
> especially if there's images on the content page.

You don't want to use an iframe.

> tried the autoHeight jquery script and it seemed to work nicely, it
> was just way to slow in cases, epscially if you clicked on a lot of
> links quickly then it just froze the site.
> any good suggestions?

Don't use jQuery, and forget about the whole idea.

<http://jibbering.com/faq/#posting>


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)
From: Zarkas on
I could see the reason not to use iframes 5 years ago when not all
browsers supported it, but why not today?
Aside from the resize problem it normally works pretty well, and is
still one of the easist ways to load dynamic content if you just want
to update a part of a page only.

-Zarkas


On 13 Jun., 16:05, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
wrote:
> Zarkas wrote:
> > Looking for a good crossbrowser script to resize my iframe according
> > to its content.
>
> This nonsense has been discussed before.
>
> > setting it to the documents offsetHeight in the frames onload event
> > seems to work most of the time but sometimes it a bit to short
> > especially if there's images on the content page.
>
> You don't want to use an iframe.
>
> > tried the autoHeight jquery script and it seemed to work nicely, it
> > was just way to slow in cases, epscially if you clicked on a lot of
> > links quickly then it just froze the site.
> > any good suggestions?
>
> Don't use jQuery, and forget about the whole idea.
>
> <http://jibbering.com/faq/#posting>
>
> PointedEars
> --
> Danny Goodman's books are out of date and teach practices that are
> positively harmful for cross-browser scripting.
>  -- Richard Cornford, cljs, <cife6q$253$1$8300d...(a)news.demon.co.uk> (2004)

From: SAM on
Le 6/13/10 4:24 PM, Zarkas a �crit :
> I could see the reason not to use iframes 5 years ago when not all
> browsers supported it, but why not today?

Because :
- not bookmarkable
- poor accessibility
- ugly ?

> Aside from the resize problem it normally works pretty well, and is

If the resizing is not too hight, possibly.
A lot of users don't display their applications, whom browsers, in full
screen.
Not every body use a 24" monitor.

> still one of the easist ways to load dynamic content if you just want
> to update a part of a page only.

You can tempt do do it by Ajax (with an exit way if JS is disabled)
with same inconvenient as iframes.

But, today, the refresh/reload of a page whom a part of its content has
changed is really fast (the longer is the job made server side to
rebuild the htlm to serve, except if heavy images are sent with) and not
more with a white display between the 2 "pages".

--
sm