Nils: ID dynamsich ändern

Beitrag lesen

Klar....

<table>
<xsl:for-each select="SATZ">
   <tr id="id1">

<script language="JavaScript" type="text/javascript">
     var el = document.getElementById("id1");
     var count = <xsl:value-of select="position()"/>;
     var mod = (count%2);

if(mod != 0)
     {
      el.style.backgroundColor="#00ffcc";
     }
     else
     {
      el.style.backgroundColor="#aabbcc";
     }
    </script>

<td>
     Satz<xsl:value-of select="position()"/>&#160;
    </td>
    <td class="courier" >
     <xsl:value-of select="Name"/>&#160;
    </td>
    <td class="courier">
     <xsl:value-of select="Vorname"/>&#160;
    </td>
    <td class="courier">
     <xsl:value-of select="Datum"/>&#160;
    </td>
    <td class="courier">
     <xsl:value-of select="MA-NR"/>&#160;
    </td>

</xsl:for-each>
   </table>