Can't adjust the iFrame height to fit the contents.

  • Thread starter Thread starter Cal Who
  • Start date Start date
C

Cal Who

For the last few days I've been looking on the Internet for code to adjust
an iFrame height to fit the contents.

I see many time that it is necessary to check the browser type and have the
code act accordingly.

I can't generate my own code because don't know enough about the various
browsers and their capabilities.

So I copy code from Internet sites and try them.

Sometimes it will not even run.

Often it runs and then stops with an error.

Otherwise, it does not accurately change the height.

I'm sure most of it worked OK at one time and that things have changed since
then.

So I'm asking if you have such code that you are willing to share by
displaying it here?

Be nice if I could support the browsers used by most people and default to
some fixed height for the others.


Thanks in advance for any help.
 
I've been working on trying to generate different code for each of the
browsers I have.

I'll think about combinding them into one routine later.

I find iframeWindow.contentDocument.body works for IE8

Which is supurising because people seem to use contentWindow for IE.

I tried everything I could find each with variations but can't get FF to
work at all.

Do you know how to get FF to adjust the height of a iFrame to match the
contents?


Thanks
 
Back
Top