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

Discussion in 'Javascript' started by jrefactors@hotmail.com, Jan 1, 2005.

  1. Guest

    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!!
     
    , Jan 1, 2005
    #1
    1. Advertising

  2. Noozer Guest

    <> wrote in message
    news:...
    > 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.
     
    Noozer, Jan 1, 2005
    #2
    1. Advertising

  3. rf Guest

    <> wrote

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


    No you don't.

    --
    Cheers
    Richard.
     
    rf, Jan 1, 2005
    #3
  4. juglesh Guest

    <> wrote in message
    news:...
    >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.
     
    juglesh, Jan 1, 2005
    #4
  5. Fred Oz Guest

    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
     
    Fred Oz, Jan 1, 2005
    #5
  6. Sid Ismail Guest

    On 31 Dec 2004 21:53:47 -0800, 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
     
    Sid Ismail, Jan 1, 2005
    #6
  7. Richard Guest

    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.
     
    Richard, Jan 1, 2005
    #7
  8. Grant Wagner Guest

    "juglesh" <> wrote in message
    news:eek:XsBd.2233$3m6.1002@attbi_s51...
    >
    > <> wrote in message
    > news:...
    > >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 <>
    comp.lang.javascript FAQ - http://jibbering.com/faq
     
    Grant Wagner, Jan 6, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    9
    Views:
    19,696
  2. ScottZ
    Replies:
    2
    Views:
    379
    Jorgen Grahn
    Nov 2, 2008
  3. Rick Humphrey

    Browser MAximize

    Rick Humphrey, Aug 7, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    117
    Rick Humphrey
    Aug 7, 2005
  4. King Maker

    MAXIMIZE the Browser Automaticaly

    King Maker, May 21, 2010, in forum: Ruby
    Replies:
    0
    Views:
    158
    King Maker
    May 21, 2010
  5. Dropstengel
    Replies:
    7
    Views:
    117
    kaeli
    Aug 17, 2004
Loading...

Share This Page