• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 11. Using Windows and Frames > Moving and Resizing Windows

Moving and Resizing Windows

New to JavaScript 1.2 is the ability to move or resize windows. While Netscape 4 placed some restrictions on this, Netscape 6 and Internet Explorer 5 and later allow you to move and resize any window freely. You can do this using the following methods for any window object:

  • window.moveTo() moves the window to a new position. The parameters specify the x (column) and y (row) position.

  • window.moveBy()moves the window relative to its current position. The x and y parameters can be positive or negative, and are added to the current values to reach the new position.

  • window.resizeTo()resizes the window to the width and height specified as parameters.

  • window.resizeBy() resizes the window relative to its current size. The parameters are used to modify the current width and height.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint