iframe problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

iframe problem

Post by John Cartwright »

How can I make an iframe the size of the page it is containing.

For example, it's source is 600 px, I want the iframe to stretch to 600px instead of simply getting the scroller.

I tried simply setting the height to 100% but that only fills the iframe to the maximum height of it's container.

Any help is much appreciated; TY/
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

generally, I've had to add some scripting to "measure" the contained text, and use the style accessors to switch the height.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Feyd, I have no idea how that can be done.

how on earth to we measure a site's height?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It's been a while since I've had to do it, but I remember having a quick interval set up while the page was loading, checking all the divs, or maybe div in this case, and continuously reading their dimensions, and adjusting the iframes dimensions to match. Sorry, I can't be a whole lot better than that. :D

Thinking about it, Tigra has a dynamic scroller that does this basically.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

What's Tigra?

google found there are a bunch of trigra scrollers...

can't quite find what you are talkinga bout tho...

if you got the link handy somehwere... :P
Last edited by John Cartwright on Sat Aug 07, 2004 3:16 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

thats brinigng up a: The page cannot be displayed

and that site doesnt look open source :P grr
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the non-pro stuffs is free to use..
Post Reply