Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > ... and resizing IFRAMEs

Reply
Thread Tools

... and resizing IFRAMEs

 
 
alejandro.rivero
Guest
Posts: n/a
 
      11-07-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing a div by resizing its borders Pil (Trustworthy from Experience) Javascript 9 04-21-2009 07:35 AM
Resizing a div by resizing its borders Proper Javascript 0 04-18-2009 08:02 PM
Dynamic resizing of iframes based on content height Peter Javascript 1 05-08-2005 10:31 PM
URGENT:ASP.Net and IFrames Mustafa Rabie ASP .Net 1 08-19-2004 05:17 AM
Iframes and session variables--HELP requested =?Utf-8?B?VmFuIFN0ZWVuYmVyZ2VuIEphbg==?= ASP .Net 0 07-01-2004 07:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57