Objective

The window.open features string

  1. window.open may not work on modern browsers
  2. window.open may open a new tab instead of a new window on modern browsers
  3. setting the new windows features is non-standard, so this documentation is quickly becoming obsolete
  4. you can open a window using: window.open(url, name, features, replace)
    1. url specifies the page that will be loaded into the new window
    2. name specifies the name of the window so that it can be used as the target of future links; you can also use "_blank" to specify a new window every time
    3. features specifies what what features the new window should have
    4. replace is a boolean value that determines if the new window will create a new entry in the browser history or replace the current entry
  5. the features string is just a comma separated list of the options you want the new window to have
  6. do not include spaces or quotes within the features string
  7. including a feature in the features string means you want it included on the new window
  8. if you don't specify any features, then the browser will use a default set of features
  9. if you specify any feature, then the remaining (non-width/height) features will be dropped unless they are also specified
  10. some browsers may put the new window into a new tab if the width and height aren't specified
  11. some browsers may put the new window into a new tab no matter what
  12. some browsers may put the new window into a new window no matter what
  13. there is usually a minimum width and height, such as 100 by 100 pixels
  14. here are the features you can set (these are non-standard)
    1. width=nnn (where nnn is the desired width in pixels)
    2. height=nnn (where nnn is the desired height in pixels)
    3. left=nnn (where nnn is the screen position of the left edge in pixels)
    4. top=nnn (where nnn is the screen position of the top edge in pixels)
    5. location (specifies that the location box should be displayed)
    6. menubar (specifies that the menu bar should be displayed)
    7. resizable (specifies that the window should be resizable)
    8. status (specifies that the status bar should be displayed)
    9. toolbar (specifies that the tool bar should be displayed)
    10. scrollbars (specifies that scrollbars should be displayed if they are needed)