hannes: Fehler im OpenWindow(action)

Hi,
nachdem mir das Letzte mal so gut geholfen wurde, komme ich nochmal mit einer anderen Frage:
Folgendes script zum Öffnen eines neuen Fensters mit ganz bestimmten Parametern funktioniert auf meinem PC einwandfrei, auf den Server gepackt tritt aber irgendein Fehler auf und das Script wird nicht mehr ausgeführt. Fehler im Code? Oder gibt es auch sowas, dass die Server bestimmte Scripts unterbinden?

mfg und ein großes Dankeschön an alle Leute mit viel plan und gutem willen.
hannes

<html>

<head>  <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
  <title>sitemap pop up</title>
<SCRIPT><!--
function CSClickReturn () {
 var bAgent = window.navigator.userAgent;
 var bAppName = window.navigator.appName;
 if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
  return true; // dont follow link
 else return false; // dont follow link
}

CSStopExecution = false;
function CSAction(array) {
 return CSAction2(CSAct, array);
}
function CSAction2(fct, array) {
 var result;
 for (var i=0;i<array.length;i++) {
  if(CSStopExecution) return false;
  var actArray = fct[array[i]];
  if(actArray == null) return false;
  var tempArray = new Array;
  for(var j=1;j<actArray.length;j++) {
   if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
    if(actArray[j][0] == "VAR") {
     tempArray[j] = CSStateArray[actArray[j][1]];
    }
    else {
     if(actArray[j][0] == "ACT") {
      tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
     }
    else
     tempArray[j] = actArray[j];
    }
   }
   else
    tempArray[j] = actArray[j];
  }
  result = actArray0;
 }
 return result;
}
CSAct = new Object;

function CSOpenWindow(action) {
 var wf = "";
 wf = wf + "width=" + action[3];
 wf = wf + ",height=" + action[4];
 wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
 wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
 wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
 wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
 wf = wf + ",directories=" + (action[9] ? "yes" : "no");
 wf = wf + ",location=" + (action[10] ? "yes" : "no");
 wf = wf + ",status=" + (action[11] ? "yes" : "no");
 window.open(action[1],action[2],wf);
}

// --></SCRIPT>
</CSSCRIPTDICT><CSACTIONDICT>
<SCRIPT><!--
CSAct[/*CMP*/ 'B6DE57FC5'] = new Array(CSOpenWindow,/*URL*/ '../sitemap.html','',450,500,false,true,false,false,false,false,false);

// --></SCRIPT>
</CSACTIONDICT>
 </head>

<font face="Verdana" size="1" color="#339933"><u><A
href="../sitemap.html"
onclick="CSAction(new Array(/*CMP*/'B6DE57FC5'));return CSClickReturn();"
target=_blank title=Sitemap><b>sitemap</b></a></u></font></td>
    <td width="5" height="16" valign="bottom">
     <div align="right">
      </div>

</body>

</html>

  1. Hallo Hannes,

    Das Qualitätsscript, das du da gepostet hast, hat vermutlich GoLive ausgespuckt. Auf sehr umständliche Art wird ein neues Fenster geöffnet. Lösch einfach das gesamte Script und schreibe den Link dann so:

    <a href="../sitemap.html" target="_blank" onclick="window.open('../sitemap.html','_blank','width=450,height=500');return false;">Sitemap</a>

    Bei solch elementaren Dingen lohnt es sich aber unbedingt, selbst nachzulesen. Ein Anfang wäre hier:
    http://selfhtml.teamone.de/javascript/objekte/window.htm#open.

    Grüße, Stefan

    1. Hi Stefan,

      vielen Dank für Deine Hilfe, GoLive bringt echt immer die verrücktesten Scripts...
      Ich werde in zukunft erstmal genau auf die Suche in selfhtml gehen, ich hatte keine Ahnung, was da alles drinsteht.

      mfg
      hannes