need auto-resize javascript code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbc3826
    Confirmed User
    • May 2006
    • 242

    #1

    need auto-resize javascript code

    I need a javascript code that auto-resizes my page to lets say 300x300 when they go to it. I tried looking on google but couldnt find anything.
  • madawgz
    8.8.8.8
    • Mar 2006
    • 30509

    #2
    you can take this and edit it

    Code:
    <script language="JavaScript">               
    <!-- START               
    if (top.frames.length!=0)               
    top.location=self.document.location;                            
    self.moveTo(0,0)               
    self.resizeTo(screen.availWidth,screen.availHeight)               
    // END -->      
    </script>
    TAEMDLRMSKRJIXMRLSMRJ.

    Comment

    • bbc3826
      Confirmed User
      • May 2006
      • 242

      #3
      Originally posted by madawgz
      you can take this and edit it

      Code:
      <script language="JavaScript">               
      <!-- START               
      if (top.frames.length!=0)               
      top.location=self.document.location;                            
      self.moveTo(0,0)               
      self.resizeTo(screen.availWidth,screen.availHeight)               
      // END -->      
      </script>
      where do you put the width and height ?

      Comment

      • SmokeyTheBear
        ►SouthOfHeaven
        • Jun 2004
        • 28609

        #4
        Originally posted by bbc3826
        where do you put the width and height ?
        self.resizeto(300,300);
        hatisblack at yahoo.com

        Comment

        • bbc3826
          Confirmed User
          • May 2006
          • 242

          #5
          Originally posted by SmokeyTheBear
          self.resizeto(300,300);
          I tried both this:
          <script language="JavaScript">
          <!-- START
          if (top.frames.length!=0)
          top.location=self.document.location;
          self.moveTo(0,0)
          self.resizeto(300,300)
          // END -->
          </script>

          and this:
          <script language="JavaScript">
          <!-- START
          if (top.frames.length!=0)
          top.location=self.document.location;
          self.moveTo(0,0)
          self.resizeto(300,300);
          // END -->
          </script>

          neither worked and gives me some javascript error. Do I need to add something to the body tag?

          Comment

          Working...