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

Discussion in 'ASP .Net' started by Cal Who, Jun 1, 2010.

  1. Cal Who

    Cal Who Guest

    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.
    Cal Who, Jun 1, 2010
    #1
    1. Advertising

  2. Cal Who

    Cal Who Guest

    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
    Cal Who, Jun 2, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GhislainTanguay

    How to adjust the height between two rows

    GhislainTanguay, Oct 14, 2003, in forum: HTML
    Replies:
    1
    Views:
    596
    Steve Pugh
    Oct 14, 2003
  2. Piet
    Replies:
    0
    Views:
    508
  3. Cal Who
    Replies:
    2
    Views:
    403
    Cal Who
    Jun 1, 2010
  4. active

    Can't adjust table height

    active, Apr 3, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    106
    active
    Apr 3, 2007
  5. MattB
    Replies:
    0
    Views:
    107
    MattB
    Aug 6, 2004
Loading...

Share This Page