user63898 user63898 - 2 years ago 116
Javascript Question

How to make in Javascript full screen windows (stretching all over the screen)

How can I make a visitor's browser go fullscreen using JavaScript, in a way that works with IE, Firefox and Opera?

Answer Source

This is as close as you can get to full screen in JavaScript:

<script type="text/javascript">
    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 < screen.availHeight || top.window.outerWidth < screen.availWidth) {
                top.window.outerHeight = screen.availHeight;
                top.window.outerWidth = screen.availWidth;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download