Full Window Display?

Discussion in 'JavaScript' started by MichaelLewis, Apr 24, 2008.

  1. #1
    When my web site opens, the window is always reduced. I understand that to expand my display to a full window, I need to issue some JavaSript instructions.

    Can you tell me what they are?

    Thank you,
    Michael
     
    MichaelLewis, Apr 24, 2008 IP
  2. eTechDude.com

    eTechDude.com Member

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    <script type="text/javascript">
    function max()
    {
    var obj = new ActiveXObject("Wscript.shell");
    obj.SendKeys("{F11}");
    }
    </script>
    </head>
    <body onload="javascript:max()">
    Code (markup):
    or
    function winalign(){
    window.resizeBy(-10,-10);
    setTimeout("window.resizeBy(10,10);",200);
    }
    Code (markup):
     
    eTechDude.com, Apr 24, 2008 IP
  3. MichaelLewis

    MichaelLewis Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #3
    Thanks but the first proposed solution doesn't do what I want.
    It removes some of the bars at the top of the MS Explorer display.
    What I'm looking for is the equivalent of clicking the MAXIMIZE icon at the top right of the MS Windows.

    The second proposed solution doesn't do anything.
    Also, I believe there is a syntax error in it.
    proposed:
    setTimeout("window.resizeBy(10,10);",200);
    I've tried that and
    setTimeout("window.resizeBy(10,10),200");
    but it stll doesn't do anything.

    Thanks,
    Michael
     
    MichaelLewis, Apr 24, 2008 IP
  4. ToddMicheau

    ToddMicheau Active Member

    Messages:
    183
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #4
    There is no real way to 'maximize' a window, the only thing you can do is use javascript to emulate that effect, by placing the window at 0,0 and setting the width and height to the screen's. There is an option to make it full screen, as in covering the taskbar, but that's IE exclusive last I checked. . .

    Psudo-maximized with JS:
    
    <script language="JavaScript">
    
    window.moveTo(0,0);
    window.resizeTo(screen.width,screen.height);
    
    </script>
    
    Code (markup):
     
    ToddMicheau, Apr 24, 2008 IP