Uups, da ist das falsche Script kopiert worden. Nochmal:
<
script type="text/javascript"><!--
var skipPage = true; bAgent = window.navigator.userAgent; bAppName = window.navigator.appName; bMozIdx = bAgent.indexOf("Mozilla/");
if ((bAppName.indexOf("Netscape") >= 0) && (bAgent.indexOf("Mozilla/2") >= 0)) skipPage = false;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/2") >= 0)) skipPage = false;
if ((bAppName.indexOf("Netscape") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0)) skipPage = false;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0)) skipPage = false;
if ((bAppName.indexOf("Netscape") >= 0) && (bAgent.indexOf("Mozilla/4") >= 0)) skipPage = false;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("MSIE 4") >= 0)) skipPage = false;
if ((bAppName.indexOf("Netscape") >= 0) && (bAgent.indexOf("Netscape5") >= 0)) skipPage = false;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("MSIE 5") >= 0)) skipPage = false;
if ((bAppName.indexOf("Netscape") >= 0) && (bAgent.indexOf("Netscape6") >= 0)) skipPage = false;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("MSIE 6") >= 0)) skipPage = false;
if ((bAppName.indexOf("Netscape") >= 0) && (bMozIdx >= 0) &&
(parseInt(bAgent.substring(bMozIdx+8, bMozIdx+10)) >= 7)) skipPage = false;
if ((bAppName.indexOf("Netscape") >= 0) && (parseInt(bAgent.indexOf("Netscape/") + 9, bAgent.indexOf("Netscape/") + 10)) >= 7))
skipPage = false;
if (skipPage) { location = /*URL*/'Sorry.html'; }
//--></script
>
Ausgetauscht wurde hier nur:
if ((bAppName.indexOf("Explorer") >= 0) && (bMozIdx >= 0) &&
(parseInt(bAgent.substring(bMozIdx+8, bMozIdx+10)) >= 7))
gegen:
if ((bAppName.indexOf("Netscape") >= 0) && (parseInt(bAgent.indexOf("Netscape/") + 9, bAgent.indexOf("Netscape/") + 10)) >= 7))
Das ganze Script muss mit "noedit" eingeschlossen werden, da GL nach jeder Einstellungsänderung im Inspektor das Script zurücksetzt. Dadurch lässt es sich allerdings nicht mehr im Inspektor einstellen sondern nur im Quelltext.
Nun besteht aber noch ein Problem:
Wenn ich die Auto-Funktion ausschalte und einen Netscape-Browser (z.B.) umleiten will, werden alle höheren Netscape-Versionen ebenfalls umgeleitet.
Wie gesagt ich bin kein Programmierer und verstehe nicht viel vom Scripting – doch das muss doch zu lösen sein!?
Gruß von Eckhard