By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

window resize to required size

P: n/a
Hi everybody,
after trying 'round for hours and wishing all browser engine programmers to
hell :-) I'd like to ask if anyone knows a solution for this:

A dynamically created html page contains a body tag with a single (filled)
table in it. Sie size of the table changes in a wide scale (from 5% to 150%
of the screen size independent in height and width.
The page is displayed in a popup window opened either via an onclick-event
or a href anchor (depends on the navigation). Now the obvious problem is
this:
When choosing a fixed window size things look silly most of the time. Either
you have a nearly empty window or you have to scroll all the time...

So I want to resize the window. Resize it to what size? The size that is
required by the pages content when redered in the browser. That's all :-)

-- hmmm -- I tried around quite a lot with scrollHeigths, offsetWidth and so
on, but there does not seem to be any more or less reliable solution.,
Especially not when trying to make stuff usable for different browsers.
Does anyone have a hint what else I can try, where I could look?

Thanx in advance for any replies!
--
arkascha
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


arkascha wrote:

So I want to resize the window. Resize it to what size? The size that is
required by the pages content when redered in the browser.


if (window.sizeToContent) {
window.sizeToContent();
}
is supported in Mozilla browsers (Netscape 7, Firefox, Mozilla Suite).

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
DU
Martin Honnen wrote:


arkascha wrote:

So I want to resize the window. Resize it to what size? The size that is
required by the pages content when redered in the browser.

if (window.sizeToContent) {
window.sizeToContent();
}
is supported in Mozilla browsers (Netscape 7, Firefox, Mozilla Suite).


I see 2 possible problems regarding these browsers.
1- Edit/Preferences.../Advanced/Scripts & plugins/Allows scripts to:
Move or resize windows checkbox unchecked will neutralize
sizeToContent(); a workaround would be bug 179704
https://bugzilla.mozilla.org/show_bug.cgi?id=179704
2- Bug 187815
https://bugzilla.mozilla.org/show_bug.cgi?id=187815

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.