Basic HTML version of Foils prepared 23 June 1997

Foil 48 Creating New Windows

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo


1 The window object has a method open, which creates a new window. This is equivalent to clicking "New Web Browser" on the File menu
2 childw = window.open(URL, Name, Features);
3 Features is a set of comma-separated options such as:
  • toolbar = yes [no];
  • location = yes [no]; (display a location text box)
  • resizable = on [off]; (allow resizing of window)
  • status = yes [no]; (display status bar at bottom)
  • menubar = yes [no];
  • directories = yes [no]; (display the not so useful directories bar)
  • scrollbars = yes [no]; (allow scrollbars if needed)
  • width = W; (window width in pixels)
  • height = H; (window height in pixels)
4 A script in a spawned window can access properties of the originating window with top.opener

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998