Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Window | Q90 [ previous next ]

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?'

©2018 Martin Webb