reptile7's JavaScript blog
Tuesday, September 08, 2009
Full Screen Ahead
Blog Entry #156

HTML Goodies' "New Window: No Title Bar" tutorial is an outgrowth of an earlier "So, You Want A FullScreen Browser, Huh?" tutorial, which we should briefly discuss before going through "New Window: No Title Bar".

As previously noted in Blog Entry #154, "So, You Want A FullScreen Browser, Huh?" concerns itself with the maximization of )-opened windows via the strWindowFeatures fullscreen feature:

<script type="text/javascript">
function fullwin( ) {"/legacy/beyond/dhtml/bigpage.html", "big", "fullscreen,scrollbars"); }
/* The strUrl and strWindowName values are those for the tutorial demo. */

(Contra the last paragraph in the tutorial's "Open In FullScreen Mode" section, big is not the name of "the page" but of the window holding that page. The document object does not have, nor does it need, a name property.)

Just to be clear before moving forward, "maximization" and "fullscreen" mean occupying all the available displayable surface of a screen.

The fullscreen feature was implemented by Microsoft and remains a 'Microsoft feature', notwithstanding Joe's claim that [i]t is available in both Internet Explorer and Netscape Navigator:

• With respect to 'classic' (pre-DOM) JavaScript, fullscreen is not listed in the "Optional features to specify for a new window" table in the ) section of the JavaScript 1.3 Client-Side Reference.

• In the "Window functionality features" subsection of Mozilla's current ) page, there's a fullscreen entry that in part reads:

Do not use. Not implemented in Mozilla. There are no plans to implement this feature in Mozilla.

Joe provides a fullscreen demo in the "Click to Full Screen Mode" section of the tutorial. Clicking the button does open a new window, but generally not a maximized window*, holding a bigpage.html document. However, testing the tutorial demo with various browsers did not sort out to my satisfaction support for the fullscreen feature (or whether it was having any effect at all, for that matter); towards this end, I found it necessary to subtract fullscreen from the strWindowFeatures string and then compare window-rendering results in the presence and absence of fullscreen. Without getting into the details, I can now report that, with the sole exception of iCab 3.0.5, none of the browsers on my computer supports the fullscreen feature.

(*For all browsers, and unrelated to the fullscreen feature, the new window is maximized if the opener window was itself originally rendered as a maximized window - see the "Description" section of Mozilla's ) page.)

More specifically, the fullscreen feature has no effect with the following browsers:
• In the OS X environment: MSIE 5.2.3, Opera 9.64, Safari 4.0.3, Firefox 3.5.2, and Camino 1.6.9
• In the SheepShaver environment: MSIE 4.5 and Netscape Communicator 4.61

But perhaps fullscreen is best left on the shelf, so to speak; Mozilla's ) fullscreen entry also states:
fullscreen always upsets users with large monitor screen[s] or with dual monitor screen[s]. Forcing fullscreen onto other users is also extremely unpopular and is considered an outright rude attempt to impose [a] web author's viewing preferences onto users.
Got that, maximizers? On the other hand, I can certainly see how a fullscreen window would be desirable in some situations, e.g., for displaying a really large image or table. Also, the Wiktionary "full screen" page to which I linked at the beginning of the post notes another useful fullscreen application: Most computer games are played in full screen mode.

Closing bigpage.html's window

The bigpage.html document holds a Close window hyperlink for closing the not-so-fullscreen window:

<a href="#" onclick="window.close('big');">Close window</a>

In the tutorial's "Close It Up" section, Joe alleges that the new window name (big, as set by the second ) parameter) must be fed as a parameter to the window.close( ) command for the command to work. For the record, folks:
(1) The close( ) method of the window object takes no parameters.
(2) The name property of the window object is used to target link and form output to a window/frame, and that's pretty much it.
In the event, however, clicking the Close window link throws no errors and uneventfully closes the new window.

The "Close It Up" section also gives the corresponding code for closing the new window with a push button, which semantically is a better element choice for this type of user interface action.

According to Microsoft, the fullscreen feature hides the [new window's] title bar and menus, ergo its connection to "New Window: No Title Bar", which we'll dissect in the next entry.


Comments: Post a Comment

<< Home

Powered by Blogger

Actually, reptile7's JavaScript blog is powered by Café La Llave. ;-)