stupotthesecond
Technical User
I am generating a table using XSL from an XML document using an <xsl:for-each> loop.
What I need to do is alternate the background colour of each <tr> within this loop so I end up with one white row then one grey row, then one white row then etc... (somthing like the way the thread subjects are displayed in the forum)
Is there any way of doing this using XSL (with variables?)or do I need to use a javascript function, once the document has finished loading, to then change each <tr> 'bgcolor' attribute ?
What I need to do is alternate the background colour of each <tr> within this loop so I end up with one white row then one grey row, then one white row then etc... (somthing like the way the thread subjects are displayed in the forum)
Is there any way of doing this using XSL (with variables?)or do I need to use a javascript function, once the document has finished loading, to then change each <tr> 'bgcolor' attribute ?