We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Maximize window on initial page load

codequest
codequest asked
on
Medium Priority
5,561 Views
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.

Thanks!
Comment
Watch Question

Principal Systems Engineer
CERTIFIED EXPERT
Top Expert 2005
Commented:
You can not resize the window unless it is opened by javascript window.open () ?

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

e.g.

window.open ("http://www.yahoo.com", "new", "fullscreen,status=no");

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Commented:
Unfortunately, you can not maximize a window unless you open it through window.open - 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:

self.resizeTo(screen.width,screen.height);
self.moveTo(0,0);

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

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

Author

Commented:
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...

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20295248.html?query=maximize+window+on+load&topics=87

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

Grazie!

Author

Commented:
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!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.