Forenindex » Programmierung/Entwicklung » JavaScript » Button-Problem CSaction

Button-Problem CSaction

toddy
Beiträge gesamt: 1

7. Feb 2003, 12:41
Bewertung:

gelesen: 2689

Beitrag als Lesezeichen
Hallo,
ich habe ein Problem mit einem Java-Script.

Habe zunächst ein Frameset erstellt - ein schmaler Frame oben und
zwei vertikale Frames unten. Im oberen Frame befinden sich mehrere Buttons, die nach Klick den Content in die beiden unteren Frames schiessen. Die Button sollten nach Klick weiss werden, klappt soweit auch bei den ersten vier Button, leider nicht beim letzten (Serge & Magdalena). Dieser Button wird zwar weiss, andere Button werden aber nicht deaktiviert.

Hier zu sehen:
http://www.ttams.de/.../html/directors.html

Hier die vollständige Seite inkl. Scriptaufruf:

<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
<title></title>
<csscriptdict>
<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];
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 = actArray[0](tempArray);
}
return result;
}
CSAct = new Object;
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div").style; }
function CSNSStyl(s) { return CSFindElement(s,0); }
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];
var curDoc = ly ? ly.document : document; var elem = curDoc[n];
if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {
elem = CSFindElement(n,curDoc.layers); if (elem) return elem; }}
return elem;
}
function CSSetImageURL(action) {
var img = null;
if (document.images) {
if (!IsIE()) img = CSFindElement(action[1],0);
else img = document.images[action[1]];
if (img) img.src = action[2];
}
}function CSGotoLink(action) {
if (action[2].length) {
var hasFrame=false;
for(i=0;i<parent.frames.length;i++) { if (parent.frames.name==action[2]) { hasFrame=true; break;}}
if (hasFrame==true)
parent.frames[action[2]].location = action[1];
else
window.open (action[1],action[2],"");
}
else location = action[1];
}
// --></script>
</csscriptdict>
<csactiondict>
<script><!--
CSAct[/*CMP*/ 'B839B2480'] = new Array(CSSetImageURL,/*CMP*/ 'peterkleine',/*URL*/ '../../gfx/dirImages/dir_peterR.gif');
CSAct[/*CMP*/ 'B839B2631'] = new Array(CSGotoLink,/*URL*/ 'dirframePeter1.html','dir nameframe');
CSAct[/*CMP*/ 'B839B2E52'] = new Array(CSGotoLink,/*URL*/ 'dirframePeter2.html','dir showframe');
CSAct[/*CMP*/ 'B839B3F33'] = new Array(CSSetImageURL,/*CMP*/ 'ralphloop',/*URL*/ '../../gfx/dirImages/dir_ralph.gif');

CSAct[/*CMP*/ 'B839B48B4'] = new Array(CSSetImageURL,/*CMP*/ 'ralphloop',/*URL*/ '../../gfx/dirImages/dir_ralphR.gif');
CSAct[/*CMP*/ 'B839B4A46'] = new Array(CSGotoLink,/*URL*/ 'dirframeRalph1.html','dir nameframe');
CSAct[/*CMP*/ 'B839B4AB7'] = new Array(CSSetImageURL,/*CMP*/ 'peterkleine',/*URL*/ '../../gfx/dirImages/dir_peter.gif');
CSAct[/*CMP*/ 'B839B4CA8'] = new Array(CSSetImageURL,/*CMP*/ 'christianpoetschke',/*URL*/ '../../gfx/dirImages/dir_christian.gif');
CSAct[/*CMP*/ 'B839B4DE9'] = new Array(CSSetImageURL,/*CMP*/ 'catharinaroland',/*URL*/ '../../gfx/dirImages/dir_catharina.gif');

CSAct[/*CMP*/ 'B839B51D11'] = new Array(CSSetImageURL,/*CMP*/ 'christianpoetschke',/*URL*/ '../../gfx/dirImages/dir_christian.gif');
CSAct[/*CMP*/ 'B839B52812'] = new Array(CSSetImageURL,/*CMP*/ 'catharinaroland',/*URL*/ '../../gfx/dirImages/dir_catharina.gif');
CSAct[/*CMP*/ 'B839B54313'] = new Array(CSGotoLink,/*URL*/ 'dirframeRalph2.html','dir showframe');

CSAct[/*CMP*/ 'B839B55014'] = new Array(CSSetImageURL,/*CMP*/ 'christianpoetschke',/*URL*/ '../../gfx/dirImages/dir_christianP.gif');
CSAct[/*CMP*/ 'B839B56D15'] = new Array(CSGotoLink,/*URL*/ 'dirframeChristian1.html','dir nameframe');
CSAct[/*CMP*/ 'B839B57016'] = new Array(CSGotoLink,/*URL*/ 'dirframeChristian2.html','dir showframe');
CSAct[/*CMP*/ 'B839B57917'] = new Array(CSSetImageURL,/*CMP*/ 'peterkleine',/*URL*/ '../../gfx/dirImages/dir_peter.gif');
CSAct[/*CMP*/ 'B839B58418'] = new Array(CSSetImageURL,/*CMP*/ 'ralphloop',/*URL*/ '../../gfx/dirImages/dir_ralph.gif');
CSAct[/*CMP*/ 'B839B59619'] = new Array(CSSetImageURL,/*CMP*/ 'catharinaroland',/*URL*/ '../../gfx/dirImages/dir_catharina.gif');

CSAct[/*CMP*/ 'B839B5D120'] = new Array(CSSetImageURL,/*CMP*/ 'catharinaroland',/*URL*/ '../../gfx/dirImages/dir_catharinaR.gif');
CSAct[/*CMP*/ 'B839B5DF21'] = new Array(CSGotoLink,/*URL*/ 'dirframeCatharina1.html','dir nameframe');
CSAct[/*CMP*/ 'B839B5E322'] = new Array(CSGotoLink,/*URL*/ 'dirframeCatharina2.html','dir showframe');
CSAct[/*CMP*/ 'B839B5F323'] = new Array(CSSetImageURL,/*CMP*/ 'peterkleine',/*URL*/ '../../gfx/dirImages/dir_peter.gif');
CSAct[/*CMP*/ 'B839B5FE24'] = new Array(CSSetImageURL,/*CMP*/ 'ralphloop',/*URL*/ '../../gfx/dirImages/dir_ralph.gif');
CSAct[/*CMP*/ 'B839B60E25'] = new Array(CSSetImageURL,/*CMP*/ 'christianpoetschke',/*URL*/ '../../gfx/dirImages/dir_christian.gif');

CSAct[/*CMP*/ 'B839B60E26'] = new Array(CSSetImageURL,/*CMP*/ 'serge',/*URL*/ '../../gfx/dirImages/dir_serge.gif');
CSAct[/*CMP*/ 'B839B61E27'] = new Array(CSGotoLink,/*URL*/ 'dirframeSerge1.html','dir nameframe');
CSAct[/*CMP*/ 'B839B62E28'] = new Array(CSGotoLink,/*URL*/ 'dirframeSerge2.html','dir showframe');
CSAct[/*CMP*/ 'B839B63E29'] = new Array(CSSetImageURL,/*CMP*/ 'serge',/*URL*/ '../../gfx/dirImages/dir_serge.gif');
CSAct[/*CMP*/ 'B839B64E30'] = new Array(CSSetImageURL,/*CMP*/ 'serge',/*URL*/ '../../gfx/dirImages/dir_serge.gif');
CSAct[/*CMP*/ 'B839B60E31'] = new Array(CSSetImageURL,/*CMP*/ 'serge',/*URL*/ '../../gfx/dirImages/dir_sergeM.gif');

// --></script>
</csactiondict>
</head>

<body bgcolor="#2a4358">
<table border="0" cellpadding="0" cellspacing="0" width="75">
<tr>
<td><img height="49" width="596" src="../../gfx/dirImages/dirframe.gif"></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="326">
<tr>
<td><a href="dopframe.html" csclick="B839B2480,B839B2631,B839B2E52,B839B3F33,B839B51D11,B839B52812" onclick="CSAction(new Array(/*CMP*/'B839B2480',/*CMP*/'B839B2631',/*CMP*/'B839B2E52',/*CMP*/'B839B3F33',/*CMP*/'B839B51D11',/*CMP*/'B839B52812'));return CSClickReturn();"><img height="34" width="117" src="../../gfx/dirImages/dir_peterR.gif" border="0" name="peterkleine"></a></td>
<td><a href="(Leere Referenz!)" csclick="B839B48B4,B839B4A46,B839B4AB7,B839B4CA8,B839B4DE9,B839B54313" onclick="CSAction(new Array(/*CMP*/'B839B48B4',/*CMP*/'B839B4A46',/*CMP*/'B839B4AB7',/*CMP*/'B839B4CA8',/*CMP*/'B839B4DE9',/*CMP*/'B839B54313'));return CSClickReturn();"><img height="34" width="109" src="../../gfx/dirImages/dir_ralph.gif" border="0" name="ralphloop"></a></td>
<td><a href="(Leere Referenz!)" csclick="B839B55014,B839B56D15,B839B57016,B839B57917,B839B58418,B839B59619" onclick="CSAction(new Array(/*CMP*/'B839B55014',/*CMP*/'B839B56D15',/*CMP*/'B839B57016',/*CMP*/'B839B57917',/*CMP*/'B839B58418',/*CMP*/'B839B59619'));return CSClickReturn();"><img height="34" width="135" src="../../gfx/dirImages/dir_christian.gif" border="0" name="christianpoetschke"></a></td>
<td><a href="(Leere Referenz!)" csclick="B839B5D120,B839B5DF21,B839B5E322,B839B5F323,B839B5FE24,B839B60E25" onclick="CSAction(new Array(/*CMP*/'B839B5D120',/*CMP*/'B839B5DF21',/*CMP*/'B839B5E322',/*CMP*/'B839B5F323',/*CMP*/'B839B5FE24',/*CMP*/'B839B60E25'));return CSClickReturn();"><img height="34" width="126" src="../../gfx/dirImages/dir_catharina.gif" border="0" name="catharinaroland"></a></td>
<td><a href="(Leere Referenz!)" csclick="B839B60E26,B839B61E27,B839B62E28,B839B63E29,B839B64E30,B839B60E31" onclick="CSAction(new Array(/*CMP*/'B839B60E26',/*CMP*/'B839B61E27',/*CMP*/'B839B62E28',/*CMP*/'B839B63E29',/*CMP*/'B839B64E30',/*CMP*/'B839B60E31'));return CSClickReturn();"><img height="34" width="126" src="../../gfx/dirImages/dir_serge.gif" border="0" name="serge"></a></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>


Ich will einfach nur weitere Button hinzufügen, wer weiß Rat?

Danke für Hilfe und Gruß

Torsten

Button-Problem CSaction

Markus Walker
Beiträge gesamt: 494

9. Feb 2003, 21:34
Bewertung:

gelesen: 2689

Beitrag als Lesezeichen
Offenbar werden beim letzten Link die vorhergehenden nicht behandelt und der letzte wird in den vorhergehenden Abschnitten nicht berücksichtigt.
Wurden die Scripts ausschliesslich von GL4 erstellt oder wurde manuell nach daran geändert? Falls das erste zutrifft, empfehle ich mal eine Frage im GoLive-Forum, ob da bei GL4 ein Problem vorliegt.
Ob die Actions in GL korrekt aufgesetzt wurden, kann dem Code nicht entnommen werden.