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

Opening a New Window

You'll often want to create new windows, to show users additional information without losing the information that they are reading. For example, you could open up an annotation window for a technical paper or for a news story. Although it is possible to open a new browser window with HTML, using JavaScript gives you more control over the new window's content and features. Figure 5.1 shows you a standard browser window with all the parts labeled. You can create windows that have any or all of these parts. Script 5.1 shows you how to create a window from a page (Figure 5.2) where clicking on a link brings up a new window (that contains an image of our cat, in this example).

Figure 5.1. The elements of a browser window. The names in this figure correspond to the parameters you can apply in the open() command.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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