window resize to required size

A

arkascha

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!
 
M

Martin Honnen

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).
 
D

DU

Martin said:
arkascha wrote:




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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top