In one of our applications we need to open a window in full screen mode then close the launching window automatically. Here is what I googled.
1. To open in full screen (tests passed on IE 6.0, 7.0, but Firefox doesn't support it at all)
var newWin = window.open('NewWindow.aspx','fullscreen','fullscreen,scrollbars');
2. To close the launching window without a warning message
newWin.focus();
window.open('','_parent','');
window.close();
And if full screen is not allowed by users, e.g. IE 6.0 SP2 (link), we can set the window to take the maximum possible client screen with following code,
var newWin = window.open('Main2.aspx', '',
'toolbar=no,menubar=no,titlebar=no,directories=no,
location=no,resizable=yes,status=no,fullscreen=no,
top=0,left=0,width=900,height=700');
newWin.moveTo(0,0);
newWin.resizeTo(screen.availWidth,screen.availHeight);\
However, there is a known issue. IE 7.0 will always display the address bar in the above window due to phishing detection concern. And Firefox is considering to join it as well.
Subscribe to:
Post Comments (Atom)
1 comment:
Interesting to know.
Post a Comment