Hallo Micha,
ich danke dir deine schnelle Antwort. ich habe folgendes getestet:
function switchbgcolor(e) {
var targ;
if (!e) e = window.event;
if (e.srcElement) {
alert('IE');
targ = e.srcElement;
}
else if (e.target) {
alert('Mozilla');
targ = e.target;
}
else {alert('was anders');}
if (targ.style.backgroundColor == "#ff0000") {
targ.style.backgroundColor = "#FFFFFF";
}
else {
targ.style.backgroundColor = "#FF0000";
}
}
Nun im IE kriege ich beim Onklick erst 'IE' und mein Ziel gefärbt(wie gewünscht) im Mozilla sollte ich normalerweise wenn e.target erkannt ist 'Mozilla' und das Ziel auch gefärbt. Aber in Mozilla passiert gar nicht weder der Hinweis noch das Ziel bekomme ich raus.
kannst du mir vielleicht weiter hilfen?
Beste Grüße
alkasser