Jan Lukat: (ZUR INFO) Fensterpsoition

Beitrag lesen

...der Thread http://www.teamone.de/selfhtml/sfarchiv/2000_1/t11060.htm#a55710 funktioniert aber nur mit dem IE...arbeite auf Mac mit NC 4.5...habe das Script erst mal grob für mich eingestellt....

function fenster()
{
browser = 0;
browsertype = navigator.userAgent;

x=(screen.availWidth/2)-400;
y=(screen.availHeight/2)-300;

fenster=window.open ('index2.html','window','toolbar=no,location=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=800,height=600');

if (browsertype != "")
if (browsertype.indexOf("MSIE 3.",0) > 0) browser = 5;
else if (browsertype.indexOf("Opera",0) > 0) browser = 4;
else if (browsertype.indexOf("MSIE 4.",0) > 0) browser = 6;
else if (browsertype.indexOf("MSIE 5.",0) > 0) browser = 7;
else if (browsertype.indexOf("zilla/2.",0) > 0) browser = 1;
else if (browsertype.indexOf("zilla/3.",0) > 0) browser = 2;
else if (browsertype.indexOf("zilla/4.",0) > 0) browser = 3;

else browser = 0;

if (browser != "")
if (browser == 0) window.location.href = "index2.html"
else if (browser == 1) window.location.href = "index2.html"
else if (browser == 2) window.location.href = "index2.html"
else if (browser == 3) window.location.href = "index2.html"
else if (browser == 4) window.location.href = "index2.html"
else if (browser == 5) window.location.href = "index2.html"
else fenster.moveTo(x,y)
}

...danke....