473,382 Members | 1,359 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,382 software developers and data experts.

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

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
8 8867

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

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

Similar topics

8
by: Andrew Crook | last post by:
I placed the following code in my html file window.resizeTo(1000,700) window.moveTo((screen.availWidth/2)-(1000/2),(availHeight/2)-(700/2)); The resize seems to work fine, however, the move...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
1
by: BudhramM | last post by:
I have created a frameset which is my default page. I am using window.resizeto and window.move to size and position the window on the users screen, but I also need to disable the maximize button on...
3
by: anonieko | last post by:
You can try this code: > > > > > <!--- filename: mypage.html ----> <html> ....blah blah blah <script language=JavaScript src=/Javascript/center.js></script>
10
by: santiago538 | last post by:
Hi, Is there any way to specify which monitor a Window.open() will launch a new browser window in on systems with more than one display. It would only need to work with Mozilla browsers, and not...
1
by: Brandon | last post by:
Hello there. I'm currently working on a moderately complex Visual C# windows application that I have run into a bit of a problem on. To start things off, the application has normally been run...
2
by: mac | last post by:
Hi! Is there anyone knows on how to maximze the Web form during run time? please help me to the code of what im going to do with this. Thanks and Best Regards
3
by: mrakesh84 | last post by:
How can I get the browser window to maximize on initial page load? Just to be clear, I mean specifically the kind of maximize that happens when you press the maximize button on the upper right hand...
3
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I give my user a button to change the properties of the size property of maximize screen size. How can I programmatically cause the maximize screen function to happen after changing the property...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.