Abrir Janela POPUP com open.window e
Para Abrir um arquivo em outra janela popup
1º Método.
onclick="window.open('popup.html',
'windowname1',
'width=200, height=77');
return false;">Click here for simple popup window
Now you can open a simple window, also this function can have different features of that window to appear.
Syntax
window.open(, [Window Name], [Feature List], [Replace]);
Para Abrir um arquivo em outra janela popup em Full Screen
1º Método.
onclick="window.open('popup.html',
'windowname2',
'width=200, \
height=77, \
directories=no, \
location=no, \
menubar=no, \
resizable=no, \
scrollbars=1, \
status=no, \
toolbar=no');
return false;">Click here for specific popup windowFullscreen popup window
The fullscreen parameter is supported only by Internet Exploer browser.
If you need to open fullscreen popup window in all browsers you need to use this modified function:
All browsers fullscreen popup window
<!--
function popup(url)
{
params = 'width='+screen.width;
params += ', height='+screen.height;
params += ', top=0, left=0'
params += ', fullscreen=yes';
newwin=window.open(url,'windowname4', params);
if (window.focus) {newwin.focus()}
return false;
}
// -->
onclick="popup('popup.html')">Fullscreen popup window
Centered popup window
To open new popup window in the middle of the screen we should know the size of a window and resolution of the screen. On the basis of these data, we will calculate values for the top-left corner.
Centered popup window
<!--
function popup(url)
{
var width = 300;
var height = 200;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open(url,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;
}
// -->
onclick="popup('popup.html')">Centered popup window