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.
Full-screen can be activated for the whole browser window by pressing the F11 key.
The syntax to open a popup is: window. open(url, name, params) : url. An URL to load into the new window.
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.
What about this:
var popup = window.open(URL); if (popup == null) alert('Please change your popup settings'); else { popup.moveTo(0, 0); popup.resizeTo(screen.width, screen.height); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With