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

Resizing a Window

Besides moving a window around the screen, JavaScript 1.2 also added to the language the capability of resizing a window. These methods are occasionally useful if you have a window with changing content. For example, if you use an extra window to display images of different sizes, it's useful to be able to resize the window to fit each image. The next couple of sections explain JavaScript's window resizing methods.

Resizing a Window to a Specific Size

The Window object's resizeTo() method (JavaScript 1.2) resizes a window to specified dimensions:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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