473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

window resize to required size

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
2 2056


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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: N.A. | last post by:
Hi there. I'm having a little trouble to get my webpage to behave the way i want. My "content" block changes it's size when i resize the window. If you take a look at this site (it's not...
8
by: jrefactors | last post by:
I want to maximize the browser window when I open a new window. Now I do the following, but different monitor size will yield different width and height values. ...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
1
by: SPG | last post by:
Hi, Please diregard my previous post... I have found out that doing a window.resizeTo(w,h) does not resize the client area tot his size, but the entire window (including tool bars etc). So,...
3
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
7
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.