Forum Moderators: open
I found a script in Dynamic Drive that resizes an iframe according to the content that I can AVOID UGLY scrollbars that won't fit the page design. The script should work also after the page has downloaded and then you click a link that brings a new content to your iframe.
The script works properly in mac with Safari, also with Netscape and Mozilla. Firefox adds a scrollbar for some reason even if it is defined in the page code scrolling="no". I have tested the page in Windows only with Explorer and there resizing works only if you refresh the page (otherwise it cuts the content). That's not good for two reasons: the end-user won't know to refresh it and on the other hand I have a dynamic menu tree that closes in refresh and the user is not able to change the iframe content anyway.
In mac IE I have a problem that the iframe won't resize and the information content in my iframe is cut away, in the part that should be resized.
Is there any way to change "the resizing iframe code" so that it would work in IE as well? Or is there another cross-browser way to resize the iframe according to content height?
Goiaba
[edited by: tedster at 3:02 am (utc) on Aug. 10, 2004]
[edit reason] remove link [/edit]
If I read your request properly, the script works on IE Windows (it seems to anyway) but not IE Macintosh, right?
And in fact, that script does not even work as advertised in Netscape, Mozilla or Opera on a PC either. It's close, but close doesn't count when you're trying to eliminate a scrollbar cross-browser.
We really don't have the legal right to copy that script here and work on it - and that may well be a job you need to hire someone to do, at any rate. So I am removing the link to the exact script so we don't get into any trouble.
But maybe this thread is not a total washout - does anyone have an approach to dynamically resizing the height of an iframe?
And so the line breaks fall in different spots and the same document with the same stylesheet can take up more space on one browser than another.
It's a heck of a job to get the actual height of the iframed content in pixels, and then adjust the iframe height dynamically. I'm pretty sure the iframed document would need to be on the same domain, but that will most likely be the case, I'd assume.
vixnfox
[edited by: DrDoc at 11:55 pm (utc) on Aug. 30, 2004]
[edit reason] No URLs, thanks. See TOS [WebmasterWorld.com] [/edit]