var winProps = ‘width=400,height=300,location=yes’;
var newWin = open(‘about.html’,’aWin’,winProps);
newWin.close();
- height dictates the height of the window, in pixels. You can’t specify percentage values or any other measurement besides pixels. If you don’t specify a height, the Web browser matches the height of the current window.
- width specifies the width of the window. As with height, you can only use pixels, and if you leave this property out, the Web browser matches the width of the current window.
- left is the position, in pixels, from the left edge of the monitor.
- top is the position, in pixels, from the top edge of the monitor.
- resizable specifies whether a visitor can resize the window by dragging.
- scrollbars appear at the right and bottom edges of a browser window whenever a page is larger than the window itself. To completely hide the scrollbar, set this property to no. You can’t control which scrollbar is hidden (it’s either both or neither).
- status controls the appearance of the status bar at the bottom of the window. Firefox and Internet Explorer normally don’t let you hide the status bar, so it’s always visible in those browsers.
- toolbar sets the visibility of the toolbar containing the navigation buttons, bookmark button, and other controls available to the particular browser. On Safari, the toolbar and location settings are the same: turning on either one displays both the toolbar buttons and the location field.
- location specifies whether the location field is visible. Also known as the address bar, this field displays the pages URL and lets visitors go to another page by typing a new URL. Opera, IE 7, and Firefox don’t let you hide a page’s location entirely. If you don’t turn on the location property, then the page’s URL appears up in the title bar. This feature is supposed to stop nefarious uses of JavaScript like opening a new window and sending you off to another site that looks like the site you just left. Also, Safari displays the toolbars as well as the location field with this property turned on.
- menubar applies to browsers that have a menu at the top of their windows (for example, the common File and Edit menus that appear on most programs). This setting applies only to Windows browsers—Macs have the menu at the top of the screen, not the individual window. And it doesn’t apply to IE 7, which doesn’t normally display a menu bar.