Re: Maximizing a browser

by "Mike" <ironmike(at)inav.net>

 Date:  Sat, 14 Sep 2002 23:51:56 -0500
 To:  "Techniques" <hwg-techniques(at)hwg.org>
 References:  cox pieceoshit
  todo: View Thread, Original
Sorry, Lisa, that it's taken me so long to get back to this, but I've been
busy watching the Cy-Hawk wars on TV (that's The annual University of Iowa
vs. Iowa State U football game for all of you who don't care!) I also have
been hitting my references and some online sources.

The short answer to your question about opening a maximized browser window
is that you can and you can't.

 "Maximized", "minimized" and "normal" are the terms used to describe the
*state* of a window in the Windows -- and similar-- operating system.
Maximized is the state where a window is opened full screen, covering all
windows below it, is not resizable by dragging the frame, not mavable by
dragging on the titlebar and has all of the standard features you expect of
a window -- scrollbars, menubars, statusbar, etc.

The state of a window is controlled by the operating system, and HTML and
Javascript do not have access to these *state* features, presumably for
security reasons.

Javascript does have the ability to open a browser window in "fullscreen"
mode. This is also called kiosk mode, and the viewer has no control over
"back"-ing, resizing or closing the browser window because no controls
appear on the it. The viewing area of the window is 100% of the screen real
estate. The only way to close this window is using "ctrl+alt+del"
combination to bring up the Windows Task Manager.

Javascript CAN open the window UNmaximized ("normal"), but resized so that
it covers all of the screen. This is what happens if you drag the frame of a
normal window all the way to the edges of the screen, top, bottom, left,
right. Nothing is visible below the window, but all the controls and control
features are available.

A short script added to the <body> tag of the new window will do it for you:

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

This script works in IE and NS4 on Wintel. I don't have Mac available on the
weekends, but it should work.

This script and many more are available at:

http://developer.irt.org/script/script.htm

I found the whole site loaded with useful information.

HTH!

Mike Hopkins
ironmike(at)inav.net

+++++++++++++++++++++++++++++++++++++++

----- Original Message -----
From: "Lisa Bradshaw" <zibbler(at)web-design-cs.com>



> Thanks to those who helped me open new windows with custom dimensions. I
> decided to go the HTML route. Now, my question is, using the code I have
for
> opening the new window, how do I force the new window to open in a
maximized
> browser?

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA