I am trying to open a popup window, so that it height is from the top of the screen to the “applications” bar of Windows. This is the code:
function windowOpener(windowHeight, windowWidth, windowName, windowUri) {
var windowHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
var centerWidth = (window.screen.width - windowWidth) / 2;
var centerHeight = (window.screen.height - windowHeight) / 2;
newWindow = window.open(windowUri, windowName, 'resizable=0,scrollbars=1,width=' + windowWidth +
',height=' + windowHeight +
',left=' + centerWidth);
newWindow.focus();
return newWindow.name;
}
Why doesnt it work in IE? (works in chrome)
Thanks
I think you only need screen.width and screen.height. Don’t prepend them with window.
Edit: Apparently IE requires a “fullscreen=yes” param.
Try this: