Microsoft KB Archive/287171

= How to resize the browser window to full screen size when it loads in Internet Explorer =

Article ID: 287171

Article Last Modified on 12/2/2004

-

APPLIES TO


 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 4.01 Service Pack 1
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer (Programming) 5.01 SP1
 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q287171



SUMMARY
This article describes how to use JavaScript to automatically resize the browser window to the maximum height and width when the window is loaded within a Web page.



MORE INFORMATION
 In Page view of Microsoft FrontPage, click the HTML tab.  Insert the following JavaScript just below the  tag:  window.onload = maxWindow;

function maxWindow { window.moveTo(0,0);

if (document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); }

else if (document.layers||document.getElementById) { if (top.window.outerHeight

When the page that has the JavaScript is loaded, the browser window is maximized. Notice that the window is not fully maximized to fill the whole screen, and you can drag the mouse to resize the window. In addition, the maximize button is still available if you want to fill up the screen with the window. The preceding code resizes the current browser window to the maximum height and width that are available for the screen resolution and allows the border of the window to still be visible.

