[Javascript] iframe size (may be an HTML issue)

Peter Brunone peter at brunone.com
Sat Jan 31 10:56:32 CST 2004


	You can relatively position a div tag as well, just like an
iframe.

-----Original Message-----
From: javascript-bounces at LaTech.edu On Behalf Of Chris Basken

I suppose it isn't.  It dawned on me I could use a DIV, but I don't want
to muck around with absolute positioning...

----- Original Message ----- 
From: "Peter Brunone" <peter at brunone.com>
>
> Wow... how tall is a three-gallon bag of water?
>
> If you know the width, maybe you can get the body as a string and 
> count the number of characters... But that isn't really a reliable 
> number since resolutions, font sizes, and invisible text may be a 
> factor (although I suppose you could mitigate the last one by counting

> the .innerText characters of every element in the doc).  Why is it 
> necessary to avoid scrolling?
>
> Cheers,
>
> Peter
>
> -----Original Message-----
> From: javascript-bounces at LaTech.edu On Behalf Of Chris Basken
>
> Silly question time.
>
> If I'm pulling another HTML doc into an iframe, is it possible to set 
> the iframe's height to fit the content of the HTML doc?  This is a 
> template page that uses JS to define the src of the iframe depending 
> on another parameter, but different src docs have different lengths 
> and I'd like to avoid scrolling.
>
> I know I can use:
>
>     document.all['myIframe'].style.height = x;
>
> So I need to determine x from the content of the HTML doc that's being

> pulled in, but that would depend on how it flowed, so I can't really 
> know that ahead of time (each such doc has a master table, so I can 
> match widths, but how do I determine the height?).
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu 
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>



_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list