Stefan: hintergrundbild von tabellenzellen dynamisch ändern

hi,

also nach erfolgloser suche poste ich hier mal mein problem:

ich habe ne tabelle und in einer zelle soll ein hintergrundbild per rotator gewechselt werden - soweit kein problem. nur wie weise ich das neue hintergrundbild der tabelle zu?

ich habe es folgendermassen versucht:

document.getElementById(BildTDTagName).style.background=rb;

(in rb steht der imagepfad) -> klappt nicht,
auch bei document.all funktioniert es so nicht.

document.getElementById(BildTDTagName).style.background-image=rb;
so funktioniert es auch nicht

könnt ihr mir da weiterhelfen?
und gibt es auch ne möglichkeit das hintergrundbild im ns 4.7 zu wechseln?

danke schonmal

gruss stefan

  1. könnt ihr mir da weiterhelfen?

    Hallo,

    so sollte es funktonieren:

    <td style="background-image:url(bild1.jpg);" onMouseover="this.style.backgroundImage='url(bild2.jpg)'" onMouseout="this.style.backgroundImage='url(bild1.jpg)'">
        <ilayer width="100%"><layer width="100%" onMouseover="this.background.src='bild2.jpg'" onMouseout="this.background.src='bild1.jpg'">
        Inhalt
        </layer></ilayer></td>
      </td>

    die onMouseOver- und onMouseOut-Attribute im td-Tag sind für IE (ab IE5) und NS6
    die layer-Tags sind für den NS4

    Daniel

    gruss stefan

    1. danke werds gleich mal testen