Hintergrund Bild von einer Cell im Table durch JS ändern ?
Harry
- javascript
Hi,
ich hab das Problem das ich zur Laufzeit ein Hintergrundbild einer Zelle ändern muß, ich schaffe das durch javascript in IE und Netscape 6+ aber nicht in NS 4.
<td id="aCell" background="whatever.gif">
if (document.all)
document.all.aCell.background = 'whatelse.gif';
else
document.getElementById('aCell').background = 'whatelse.gif'
Da NS4 kein ID tag benutzt geht das schlecht, hat jemand eine Idee wie das noch gehn könnte ?
Danke
ich hab das Problem das ich zur Laufzeit ein Hintergrundbild einer Zelle ändern muß, ich schaffe das durch javascript in IE und Netscape 6+ aber nicht in NS 4.
[...]
Da NS4 kein ID tag benutzt geht das schlecht, hat jemand eine Idee wie das noch gehn könnte ?
Nicht auswendig. Aber ich hab das schonmal gemacht, d.h. es geht.
Wenn ich mich recht erinnere musst du ein <layer></layer> in die Zelle schreiben, und kannst dann über das Layerobject die Hintergrundfarbe ändern.
By
Reinhard
hi
<td id="aCell" background="whatever.gif">
if (document.all)
document.all.aCell.background = 'whatelse.gif';
else
document.getElementById('aCell').background = 'whatelse.gif'
der Code da ist unnötig lang. Das zweite tut's auch fürn IE.
Oder hast du echt noch IE4..?
gruss Kai