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

Moving a Window

JavaScript 1.2 introduced a couple of new methods that enable you to move a browser window. I've never found these methods to be particularly useful because users generally prefer to have their browser windows stay put and not go racing across the screen. However, there are some useful techniques you can use to position a window in a desired location (for example, the bottom right of the user's screen) or to create small-time window "animations."

Moving a Window to a Specific Spot

The Window object's moveTo() method (JavaScript 1.2) moves a window to a spot on the screen that you specify:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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