How to show fullscreen popup window in javascript?

Maciej Gryka picture Maciej Gryka · Oct 6, 2008 · Viewed 62.6k times · Source

Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This:

window.open(src, 'newWin', 'fullscreen="yes"')

apparently only worked for old version of IE.

Answer

Geoff picture Geoff · Oct 6, 2008

Use screen.availWidth and screen.availHeight to calculate a suitable size for the height and width parameters in window.open()

Although this is likely to be close, it will not be maximised, nor accurate for everyone, especially if all the toolbars are shown.