Hallo Forum!
Im mittlerweile im Archiv-Nirwana gelandeten Thread http://forum.de.selfhtml.org/archiv/2003/12/65357/#m372016 hatte ich eine sehr umfangreiche Funktion zum Wechsel von Bildern bei MouseOver eingestellt. Ich habe sie ein wenig überarbeitet, aber der Fehler bleibt immer noch (IE: Das Objekt unterstützt diese Eigenschaft oder Methode nicht. Firebird: Error: wechsel is not a function. Netscape 7.0: Fehler: wechsel is not a function)
Das ganze Script funktioniert anfangs, später kommen eben diese Fehlermeldungen.
Kann mir jemand helfen, zumindest zu verstehen, warum es anfangs funktioniert und später (nach ca 10-50 Aufrufen, je nach Laune des Browsers) nicht mehr?
Die CSS:
<style type="text/css">
<!--
.chartinactive {font-weight:bold; color:#FF0000; background-color:#FFFFFF; font-family:Arial,Helvetica,sans-serif; font-size:10px;}
.chartactive {font-weight:bold; color:#000000; background-color:#CCCCCC; font-family:Arial,Helvetica,sans-serif; font-size:10px;}
-->
</style>
Einbindung:
<script type="text/javascript" src="./chart.js"></script>
Aufruf:
<img alt="Chart" title="Chart DAX30 (Intraday)" src="http://www.example.com/images/chart.php?typ=DAX" name="curindex" width="175" height="100" border="0"></a><br><a onmouseover="wechsel(0);" class="chartactive" id="daxchart">DAX</a>
<a onmouseover="wechsel(1);" class="chartinactive" id="tecdaxchart">TecDAX</a>
<a onmouseover="wechsel(2);" class="chartinactive" id="dowjoneschart">Dow Jones</a>
<a onmouseover="wechsel(3);" class="chartinactive" id="nasdaqchart">Nasdaq</a>
Und der Inhalt von chart.js
var ids = new Array();
ids[0] = "daxchart";
ids[1] = "tecdaxchart";
ids[2] = "dowjoneschart";
ids[3] = "nasdaqchart";
var quelle = new Array();
quelle[0] = "http://www.example.com/images/chart.php?typ=DAX";
quelle[1] = "http://www.example.com/images/chart.php?typ=TDX";
quelle[2] = "http://www.example.com/extract/chart?INST_ID=0001323&datum=1&hist=0&size=2&sym=INDU.IND";
quelle[3] = "http://www.example.com/extract/chart?INST_ID=0001323&datum=1&hist=0&size=2&sym=NDX.X.IND";
var titel = new Array();
titel[0] = "Chart DAX30 (Intraday)";
titel[1] = "Chart TecDAX (Intraday)";
titel[2] = "Chart Dow Jones (Intraday)";
titel[3] = "Chart Nasdaq (Intraday)";
var active = 0;
function wechsel(c){
if (c!=active){
if ((typeof(document.getElementById)=="function") || (typeof(document.getElementById)=="object"))
{
document.getElementsByTagName('a')[ids[active]].className = "chartinactive";
document.getElementsByTagName('a')[ids[c]].className = "chartactive";
}
else if (document.all){
document.all.ids[active].className = "chartinactive";
document.all.ids[c].className = "chartactive";
}
document.curindex.src = quelle[c];
document.curindex.title = titel[c];
active = c;
}
}
Gruß
mdkiller
ss:| zu:) ls:# fo:| de:> va:| ch:? n4:° rl:( br:> js:| ie:% fl:| mo:?
http://www.peter.in-berlin.de/projekte/selfcode/?code=ss%3A|+zu%3A)+ls%3A%23+fo%3A|+de%3A>+va%3A|+ch%3A%3F+n4%3A�+rl%3A(+br%3A>+js%3A|+ie%3A%25+fl%3A|+mo%3A%3F