I have a piece of JavaScript code that maximizes browsers window in IE but I doesn’t make any changes when I work with Chrome.
This is the code I am talking about.
window.moveTo(0, 0);
if (document.all) {
top.window.resizeTo(screen.availWidth, screen.availHeight);
}
else if (document.layers || document.getElementById) {
if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) {
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
Does anyone know a good workaround or any other solution to maximize a popup window.
Thank you for your help
You can try it this way:
Note: Browsers will whine about it (and visitors too likely), asking the visitor if he/she wants to allow blocked content, etc. But I guess that’s another issue.