user63898 user63898 - 5 months ago 8x
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?


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;