Maximize window on initial page load

Posted on 2006-04-04
Last Modified: 2008-01-09
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 corner of the browser window...not the "as big as possible" in the intermediate state between maximize and minimize (there's a difference of at least 1 pixel in size...)

Hope that's clear enough.

Any guidance on this would be appreciated.

Question by:codequest
    LVL 28

    Accepted Solution

    You can not resize the window unless it is opened by javascript () ?

    If it is opened by javascript at the time of opening you supply fullScreen

    e.g. ("", "new", "fullscreen,status=no");
    LVL 9

    Assisted Solution

    Unfortunately, you can not maximize a window unless you open it through - as said pravinasar.
    But you can resize it though (even if you seem not to want this solution).

    Here, the window resize to width and height of screen, and move to upper left corner of screen:


    Though, that's not a maximize mode, as you stated.

    But that's all you can do with a window already opened.
    LVL 2

    Author Comment

    Thanks for your input.  I have no reason to doubt that, though I might let this ride a bit and see if anyone else wants to weigh in....

    perhaps if you could confirm that the answer below is not the same as "maximize button press by user"  and does not apply here...

    <body onLoad="if (document.all || document.layers) { self.moveTo(0,0); self.resizeTo(screen.availWidth,screen.availHeight)">


    LVL 2

    Author Comment

    smcarri:  thanks for input.  I didn't see yours before my second post.  With a confirming opinion, I'm going to go with pravinasar's answer, and give you an assist.

    pravinsar:  thanks!

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    This article shows how to read a single webpage's HTML into a string variable, and it also shows how to automate a sequence so you can read and process a list of webpages.  I was tasked with reading and parsing a series of webpages to collect some s…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now