Maximizing forms in ASP.Net

Discussion in 'ASP .Net' started by mac, May 12, 2006.

  1. mac

    mac Guest

    Hi everyone

    I need your help just want to know why my webforms doest maximize i
    paste the
    script on the onload event


    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body onload="javascript:
    window.innerWidth = screen.width
    window.innerHeight = screen.height
    window.screenX = 0;
    window.screenY = 0;
    alwaysLowered = false;
    ">
    <form id="form1" runat="server">
    </form>
    </body>
    </html>


    Is there anyway of maximizing the web forms using Java Script? or do I place
    my
    code on the wrong bdy of the script ? if yes please correct my code and I
    want to
    know where can place the code.


    Thanks and Best Regards
    Mac
    mac, May 12, 2006
    #1
    1. Advertising

  2. try this in the head section

    <script language="JavaScript1.2">
    <!--
    top.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;
    }
    }
    //-->
    </script>

    --
    Regards

    John Timney
    Microsoft MVP

    "mac" <> wrote in message
    news:%...
    > Hi everyone
    >
    > I need your help just want to know why my webforms doest maximize i
    > paste the
    > script on the onload event
    >
    >
    > <head runat="server">
    > <title>Untitled Page</title>
    > </head>
    > <body onload="javascript:
    > window.innerWidth = screen.width
    > window.innerHeight = screen.height
    > window.screenX = 0;
    > window.screenY = 0;
    > alwaysLowered = false;
    > ">
    > <form id="form1" runat="server">
    > </form>
    > </body>
    > </html>
    >
    >
    > Is there anyway of maximizing the web forms using Java Script? or do I
    > place my
    > code on the wrong bdy of the script ? if yes please correct my code and I
    > want to
    > know where can place the code.
    >
    >
    > Thanks and Best Regards
    > Mac
    >
    John Timney \( MVP \), May 12, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles

    Maximizing Web Page

    Charles, Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    391
    Ken Cox [Microsoft MVP]
    Aug 9, 2003
  2. nospam
    Replies:
    13
    Views:
    612
    Guinness Mann
    Oct 7, 2003
  3. Scott

    Maximizing an aspx page

    Scott, Dec 12, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    430
    Alvin Bruney
    Dec 13, 2003
  4. Replies:
    6
    Views:
    674
  5. tele2

    Maximizing a JFrame

    tele2, Nov 10, 2005, in forum: Java
    Replies:
    1
    Views:
    465
    Oliver Wong
    Nov 10, 2005
Loading...

Share This Page