|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
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? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|