Perl programmer for hire: download my resume (PDF).
John Bokma Intrusion
freelance Perl programmer

Maximizing the browser window

Don't take over the desktop | 0 comments

Some web sites want attention so badly that they take over the entire desktop. All window chrome (title bar, status bar, etc.) is removed. Visitors sometimes don't know how to close such a window and are left stuck as intended by the designer. Microsoft Windows users can press ALT + F4 to close the window.

If you really want to know how to maximize the window, the code below works for JavaScript 1.2 and higher:

<script language="JavaScript" type="text/javascript">

    window.moveTo( 0, 0 );
    var width  = window.screen.availWidth;
    var height = window.screen.availHeight;
    window.resizeTo( width, height );

</script>
Please post a comment | read 0 comments | RSS feed