A tough problem this one...already cost me a whole day.
I have a server-generated page with an iframe (also server-generated). In that iframe is another iframe (also server-generated).
The innermost iframe is "minimized" until the user clicks a "maximize" button.
When the iframe is expanded, it resizes its parent window, which resizes its parent, and so on, up to but excluding the browser window.
The problem is that on IE6, I get unwanted and unnecessary scrollbars around the outer iframe, but on IE5.5 it works perfectly.
For anyone who can help, I've created some test URLs.
If you have IE6, you can see the problem here:
If you have IE5.5, you can see it work perfectly here:
The only difference between the IE5.5 and IE6 code is in the JavaScript function "ResizeWindow".
IE5.5 version has, near the top of ResizeWindow:
IE6 version has, instead:
This code for IE6 ensures that the window is only resized to the document's width once. Without it, it keeps getting
wider.
I don't expect anyone to figure out how all this code works!
But, if you can view the problem maybe you know the cause or can give me some suggestions.
I can prevent the problem by changing this line (also in ResizeWindow):
to
But that has other ramifications I'm not happy with...
TIA,
Russell Robinson
I have a server-generated page with an iframe (also server-generated). In that iframe is another iframe (also server-generated).
The innermost iframe is "minimized" until the user clicks a "maximize" button.
When the iframe is expanded, it resizes its parent window, which resizes its parent, and so on, up to but excluding the browser window.
The problem is that on IE6, I get unwanted and unnecessary scrollbars around the outer iframe, but on IE5.5 it works perfectly.
For anyone who can help, I've created some test URLs.
If you have IE6, you can see the problem here:
If you have IE5.5, you can see it work perfectly here:
The only difference between the IE5.5 and IE6 code is in the JavaScript function "ResizeWindow".
IE5.5 version has, near the top of ResizeWindow:
Code:
i_body_width = document.body.scrollWidth;
i_body_height = document.body.scrollHeight;
Code:
if (iOrigWidth == 0 && iOrigHeight == 0)
{
iOrigWidth = document.body.offsetWidth;
iOrigHeight = document.body.offsetHeight;
}
i_body_width = iOrigWidth;
i_body_height = document.body.offsetHeight;
wider.
I don't expect anyone to figure out how all this code works!
But, if you can view the problem maybe you know the cause or can give me some suggestions.
I can prevent the problem by changing this line (also in ResizeWindow):
Code:
document.body.scroll = 'auto';
Code:
document.body.scroll = 'no';
But that has other ramifications I'm not happy with...
TIA,
Russell Robinson