Top DevX Stories
Location-Aware App Review
The Future of Web Content -- HTML5, Flash, and Mobile Apps
Moonlight 3.0 Preview Offered For Rich Internet Apps on Linux and Unix
Why a Moderator is Key in the Engineering Review Process, Part II
Windows 7 Features Your Clients Will Need on Day One
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > Web

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-30-2003, 05:36 PM
Chuck
Guest
 
Posts: n/a
Dynamically resize IFrame?


Hello all.

I have an IFRAME control inside of an HTML document. The content of the IFRAME
is injected with some jscript code by using the Open(), write() and close()
methods. The IFRAME is absolutely positioned and is floating.

I would like to figure out how to make the IFRAME resizable so that no scrollbars
ever appear. I have been trying to see if any of the properties of the IFRAME
"tell" me that there are scrollbars, but so far I'm coming up empty.

Any suggestions?
Reply With Quote
  #2  
Old 01-31-2003, 03:06 PM
Chuck
Guest
 
Posts: n/a
Re: Dynamically resize IFrame?


Yes, haven't a conversation with myself.

Isn't this funny? After posting this message, I finally figured out how to
do what I was after. This was after spending a few brain cells every week
thinking about how this might get done (it hasn't been a high priority item).


The answer was this:
var dF = document.all.myFrame //ref to iFrame control
dF.style.display="block" // make visible
dF.height=10000;
dF.height = document.frames("myFrame").document.body.scrollHeight

The initial setting of 10000 fixed a problem where the window wasn't tall
enough initially, but if I displayed it again with the same text, it was
the right size. The display was also required as this iFrame is only displayed
in the onmouseover and hidden in onmouseout.

-Chuck

"Chuck" <curwiler@comcast.net> wrote:
>
>Hello all.
>
>I have an IFRAME control inside of an HTML document. The content of the

IFRAME
>is injected with some jscript code by using the Open(), write() and close()
>methods. The IFRAME is absolutely positioned and is floating.
>
>I would like to figure out how to make the IFRAME resizable so that no scrollbars
>ever appear. I have been trying to see if any of the properties of the IFRAME
>"tell" me that there are scrollbars, but so far I'm coming up empty.
>
>Any suggestions?


Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:04 PM.


Sponsored Links



Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.