Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q90 Is there a way to open a new window using the window.open() method so that the window opens to a specified size?

irt.org | Knowledge Base | JavaScript | Window | Q90 [ previous next ]

Q90 Is there a way to open a new window using the window.open() method so that the window opens to a specified size?

Something like the following should do it:

window.open ('sesame.html', 'newWin', 'scrollbars=yes,status=yes,width=300,height=300')

The full syntax is:

[windowVar = ][window].open("URL", "windowName", ["windowFeatures"])

Where windowFeatures is a comma-separated list of any of the following options and values:

   toolbar[=yes|no]|[=1|0]
   location[=yes|no]|[=1|0]
   directories[=yes|no]|[=1|0]
   status[=yes|no]|[=1|0]
   menubar[=yes|no]|[=1|0]
   scrollbars[=yes|no]|[=1|0]
   resizable[=yes|no]|[=1|0]
   width=pixels
   height=pixels

You may use any subset of these options. Separate options with a comma. Do not put spaces between the options.

Feedback on 'Q90 Is there a way to open a new window using the window.open() method so that the window opens to a specified size?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.