Hidden window using javascript

Just wanted to know if it's possible to create a hidden window using javascript?

+7
source share
3 answers

You can create iframe

var element = document.createElement("iframe"); element.setAttribute('id', 'myframe'); document.body.appendChild(element); 

You can hide the iframe by setting its width and height to zero or by setting the visibility to hidden in the stylesheet.

+5
source

You can also create a new window visible only on the taskbar using this workaround:

 window.open(path.html,'_blank', 'toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,left=10000, top=10000, width=10, height=10, visible=none', ''); 

which open the window at a position not visible to the user. I used this trick at different times.

+2
source

In IE 9+, you can create a window behind the scenes:

 var options = "left=" + (screen.width*2) + ",top=0"; var myWin = window.open(url, name, options); // Hide the window - IE only myWin.blur(); // Show the window - IE only myWin.focus(); 

screen.width is your monitor width. Using "* 2" allows users with dual monitors.

This does not work in Chrome.

0
source

All Articles