Web Analytics Made Easy -
StatCounter Control position and size of primary window - CodingForum

Announcement

Collapse
No announcement yet.

Control position and size of primary window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Control position and size of primary window

    Hi,

    I have searched many places trying to find a script that allows me to center and specify the size of the primary window when someone enters the website. I have checked almost everywhere and found scripts that only allow you to control a secondary window. I would like my website to position itself in the center of the user's screen and only be the size that i specify. Can anyone help me out?

    Thanks in advance

    M

  • #2
    web...
    /me seems to think it can onlyyy be controlled/positioned ifin' its just a window® YOUUU opened...aka secondary...:O((( sooo thattts why you probably just a cant® find some 'script' to do it for you...:O(((
    The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
    ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

    CommemorateWTC.com --Please lend your support

    Comment


    • #3
      You can specify the size and the position of the primary window:

      <script type="text/javascript">

      window.resizeTo(x,y) //where x=width in pixels and y=height in pixels
      window.moveTo(l,t) //where l=left position in pixels and t=top position in pixels

      </script>

      Comment


      • #4
        john...
        /me thought just a bout® that 'onload' script...
        'cept then??? its nottt the window reallly that the viewer first just a sees® when they typein/goto www.domain.com

        just a great® way to get just a round® using 'itself' to resize/position...vs /me was thinking of opening just a second® one...

        just a nother® reason yourrre the mod n' /me still isnt just a programmed® to think...hehehe...
        The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
        ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

        CommemorateWTC.com --Please lend your support

        Comment


        • #5
          thank you for the help.

          I put the following code into my page and received and error stating that x was not defined:

          <script type="text/javascript">

          window.resizeTo(x,y) //where x="801" and y="324"
          window.moveTo(l,t) //where l="300" and t="350"
          </script>


          What am I doing wrong?

          Comment


          • #6
            Those where just comments to instuct you what to put there. You would do it like this:

            <script type="text/javascript">
            window.resizeTo(801,324);
            window.moveTo(300,350);
            </script>

            or like this:

            <script type="text/javascript">
            x=801;
            y=324;
            l=300;
            t=350;
            window.resizeTo(x,y);
            window.moveTo(l,t);
            </script>

            Comment


            • #7
              G'day Web..

              I came across this earlier today and, in all honesty didnt understand the use on first thoughts, but I dragged it out of 'History' when I saw your question. If its not what youre after, please excuse the downunder newbie.. Just trying to be helpful... (and also live up to my tag LOL)

              http://www.fo3nix.pwp.blueyonder.co....enteralleg.htm

              reached from:

              http://www.fo3nix.pwp.blueyonder.co.uk/scripts.htm

              Cheers!
              KB...
              To escape criticism - do nothing, say nothing, be nothing. . . Vaya Con Dios

              Comment

              Working...
              X