Hello,
I’m trying to create 4 browser-windows that pop-up and equally distribute on the user’s screen. (Like a 2×2 grid)
Til now I have this code:
[CODE]<script>
<!–
function wopen()
{
w = screen.width / 2;
h = screen.height / 2;
var win1 = window.open(“url.html”,”window1″, “height=”+ h +”, width=”+w+”, left=0, top=0, toolbar=no, status=no, menubar=no, location=no”);
var win2 = window.open(“url.html”,”window2″, “height=”+ h +”, width=”+w+”, left=”+screen.width / 2+”, top=0, toolbar=no, status=no, menubar=no, location=no”);
var win3 = window.open(“url.html”,”window3″, “height=”+ h +”, width=”+w+”, left=0, top=”+screen.height / 2+”, toolbar=no, status=no, menubar=no, location=no”);
var win4 = window.open(“url.html”,”window4″, “height=”+ h +”, width=”+w+”, left=”+screen.width / 2+”, top=”+screen.height / 2+”, toolbar=no, status=no, menubar=no, location=no”);
win1.focus();
win2.focus();
win3.focus();
win4.focus();
}
// –>
</script>
It works quite well. The problem is that browsers overlap because they have the window-bars on top and the user has the tool-bar of the operating system aswell. So I guess that screen.size gives the whole screen’s size and that’s why the browsers including the window-bars are too big.
Does anyone know a good solution to nicely fit those browser-windows on the screen?
Thanks!