We are opening a browser window using window.Open and sets the desktop's avail width and avail height.
It's working perfectly on all Windows OS except Windows10. IE, Chrome and Firefox get some space on browser window's right and left. I spend many hours I am not able to find the right solution for this. Is there any solution to fix this issue?
Thanks,
<script>
var useragent = navigator.userAgent;
var tabScreenWidth = screen.availWidth;
var qsScreenWidth = "&screenWidth=" + tabScreenWidth;
var str = GetQueryString();
var MainWindow = window.open('Authentication/PSGLogin.aspx?' + str + qsScreenWidth, '', 'top=0,left=0,resizable=NO,toolbar=no,status=no,directories=no,menubar=no,scrollbars=0', false);
MainWindow.moveTo(0, 0);
var WindowWidth = screen.availWidth;
var WindowHeight = screen.availHeight;
if (WindowWidth > 1024)
WindowWidth -= 1;
MainWindow.resizeTo(WindowWidth, WindowHeight);
window.opener = self;
window.open('', '_self');
setTimeout("retryCloseWindow()", 2000);
function retryCloseWindow() {
window.opener = self;
window.open('', '_self');
//window.close();
setTimeout("retryCloseWindow()", 2000);
}
function GetQueryString() {
var qString = location.href;
var aryString = qString.split('?');
return aryString[1];
}
</script>