... and resizing IFRAMEs

Discussion in 'Javascript' started by alejandro.rivero, Nov 7, 2003.

  1. In Mozilla, thus,the following code seems to resize correctly the IFRAME,
    so no scroll bars:

    <iframe marginwidth=0 marginheight=0 src=text.html
    onload="this.height=
    this.contentDocument.height+25">
    </iframe>

    The +25 is just allowance for a newline. It can be done in
    a more elegant way, for sure, and it is not really needed if
    we explicitly ask noscroll.

    Also, a frameborder=0 can be desiderable too

    The moral is that the onload in the child document is not needed
    anymore except for compatibility for old/alternate browsers. For an
    instance, konqueror does not seem to admit onload in the iframe :-(

    Yours,

    Alejandro Rivero
     
    alejandro.rivero, Nov 7, 2003
    #1
    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. =?Utf-8?B?VmFuIFN0ZWVuYmVyZ2VuIEphbg==?=

    Iframes and session variables--HELP requested

    =?Utf-8?B?VmFuIFN0ZWVuYmVyZ2VuIEphbg==?=, Jul 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    836
    =?Utf-8?B?VmFuIFN0ZWVuYmVyZ2VuIEphbg==?=
    Jul 1, 2004
  2. Mustafa Rabie

    URGENT:ASP.Net and IFrames

    Mustafa Rabie, Aug 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    Lau Lei Cheong
    Aug 19, 2004
  3. Peter
    Replies:
    1
    Views:
    221
    Thomas 'PointedEars' Lahn
    May 8, 2005
  4. Pil (Trustworthy from Experience)

    Resizing a div by resizing its borders

    Pil (Trustworthy from Experience), Apr 18, 2009, in forum: Javascript
    Replies:
    9
    Views:
    374
    Proper
    Apr 21, 2009
  5. Proper
    Replies:
    0
    Views:
    215
    Proper
    Apr 18, 2009
Loading...

Share This Page