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

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

P: n/a
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!!

Jul 23 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a

<jr********@hotmail.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
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.
Jul 23 '05 #2

P: n/a
rf
<jr********@hotmail.com> wrote
I want to maximize the browser window when I open a new window.


No you don't.

--
Cheers
Richard.
Jul 23 '05 #3

P: n/a

<jr********@hotmail.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
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.
Jul 23 '05 #4

P: n/a
On Sat, 01 Jan 2005 08:12:04 GMT, juglesh wrote:
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. ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #5

P: n/a
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.

--
Fred
Jul 23 '05 #6

P: n/a
On 31 Dec 2004 21:53:47 -0800, jr********@hotmail.com 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
Jul 23 '05 #7

P: n/a
Fred Oz wrote:
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. --
Fred


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.

Jul 23 '05 #8

P: n/a
"juglesh" <ju*****@nospamRadioKDUG.com> wrote in message
news:oXsBd.2233$3m6.1002@attbi_s51...

<jr********@hotmail.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
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=y
es,scrollbars=yes,width=800,height=600'); Any ideas?
please help. thanks!!


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

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.