Popup Windows: Full Screen

A popular variation on the theme of popup windows is opening a window in full screen mode. Full screen means that the window is the full size of the screen and provides as much display area for the page as possible. MSIE and Netscape take different parameters for full screen windows, but you can use both versions. In the open() command put type=fullWindow for Netscape, and fullscreen (without any value) for MSIE. So, for example, this command in popup script opens a full screen window:

window.open(href, windowname, ',type=fullWindow,fullscreen,scrollbars=yes');

which gives us this page.

Notice that in the open() command there is no height or width properties. Leave those properties out or Netscape won't open the window in full screen mode.

In MSIE there are only two ways to close the full screen window. Most people don't know the first (press ALT+F4) so you need to provide the second, which is done with Javascript. The easiest way to provide a close button is to use our script for referring back to the opener. Copy that script into the full screen page, then use the script in a link like this:

<A HREF="linking_famsupp_87.html" onClick="return targetopener(this,true,true)">close</A>

The link in this example closes the full screen window and gives the focus to the opener, but only if the window actually is full screen and was opened from another window. If those conditions aren't true (and they wouldn't be if, for example, the user found the page through an external search engine), then the current window goes to the linked resource.

About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.