how to maximize the browser window that fits the monitor size?

J

jrefactors

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.

window.open('index.jsp',myform.target,'toolbar=no,menubar=no,resizable=yes,scrollbars=yes,width=800,height=600');
Any ideas?
please help. thanks!!
 
N

Noozer

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.

window.open('index.jsp',myform.target,'toolbar=no,menubar=no,resizable=yes,s
crollbars=yes,width=800,height=600');
Any ideas?

A couple..

1) Don't touch my browser size. I'm quite capable of resizing the window if
I need to.

2) Don't open a new window. Your site has a browser window, ONE is all you
get. Make good use of it.
 
J

juglesh

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.

window.open('index.jsp',myform.target,'toolbar=no,menubar=no,resizable=yes,scrollbars=yes,width=800,height=600');
Any ideas?
please help. thanks!!

function expand() {
window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);
}

i think the other two replies have good points, though.
 
A

Andrew Thompson

i think the other two replies have good points, though.

...especially when you consider such things as 'pop-up blockers'.

[ F'Ups set to comp.lang.js, reset as you feel appropriate. ]
 
F

Fred Oz

juglesh wrote:
[...]
window.resizeTo(...);
}

To the OP:

The reason this technique is required is because users were so pissed
off with windows opening full screen that browser makers removed the
ability for programmers to do it. Many browsers also allow the user to
stop JavaScript from resizing or moving windows.

New windows, by default in most browsers, open to the same size as the
current window. So users with full-screen windows will not notice you
setting your new window to full screen, whereas those with their
browsers set smaller will. Consider someone with a large monitor of
say 2560x1600. Or maybe with one desktop spread over two monitors. Do
you really think they want your window over their entire desktop?

Sorry to be so parochial, but *please* understand the users hate new
windows and utterly detest those that also fill the screen.

Web programming is not like VB or C++ or other windows (small 'w')
environments. Always stay within the current window.

PS.
As an evil thought, perhaps we should encourage new windows at full
screen, it will encourage users to ditch IE and flock to
Firefox/Mozilla/Netscape etc. to better deal with them.
 
S

Sid Ismail

On 31 Dec 2004 21:53:47 -0800, (e-mail address removed) wrote:

: I want to maximize the browser window when I open a new window.


Don't open a new window. Don't maximise. Do not pass Go.

It's _my_ browser.

Sid
 
R

Richard

Fred said:
juglesh wrote:
[...]
window.resizeTo(...);
}
To the OP:
The reason this technique is required is because users were so pissed
off with windows opening full screen that browser makers removed the
ability for programmers to do it. Many browsers also allow the user to
stop JavaScript from resizing or moving windows.
New windows, by default in most browsers, open to the same size as the
current window. So users with full-screen windows will not notice you
setting your new window to full screen, whereas those with their
browsers set smaller will. Consider someone with a large monitor of
say 2560x1600. Or maybe with one desktop spread over two monitors. Do
you really think they want your window over their entire desktop?
Sorry to be so parochial, but *please* understand the users hate new
windows and utterly detest those that also fill the screen.
Web programming is not like VB or C++ or other windows (small 'w')
environments. Always stay within the current window.
PS.
As an evil thought, perhaps we should encourage new windows at full
screen, it will encourage users to ditch IE and flock to
Firefox/Mozilla/Netscape etc. to better deal with them.

Yeah baby. I can just see try reading a website spread over 4 monitors!
Like they show at circuit city and best buy et al.

I think also that the reason window resize was banned, was due in part to
that cute little script that makes your window shake rattle and roll.

Now what would really be annoying is, resize the window to 200x200, no
scrollbars, no resize, and have a page ten times the size.
 
G

Grant Wagner

juglesh said:
window.open('index.jsp',myform.target,'toolbar=no,menubar=no,resizable=y
es,scrollbars=yes,width=800,height=600');

function expand() {
window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);
}

- Does not do anything in Gecko-based browsers appropriately configured
- Results in an MDI window that is both too tall and too wide in Opera
7.54u1
- Results in a window that is actually wider and taller than
screen.availWidth/Height in Netscape 4 (because resizeTo() resizes the
window's viewport, not it's outter dimensions)
- Annoys the user when it does work, since they probably had their
browser the size they wanted it
 

sb1

Joined
Apr 28, 2011
Messages
1
Reaction score
0
I agree with people's comments about not wanting to adjust a user's browser size, however, I am in the same boat as the original poster.

I am designing a site for one of our sales offices for internal use only. We have to maximize the browser size to the full size of the screen so that when people come into our sales office to use our touchscreen kiosk, they cannot have access to the address bar window or to click off the screen onto the desktop.

I guess people on this forum shouldn't automatically assume that people who are posting this are trying to be obtrusive with their web designs.

--- any advice out there?

Thanks.
 

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,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top