Click to See Complete Forum and Search --> : Alternate colors <TR> - Cumulative


pradheepayyanar
October 3rd, 2006, 01:27 AM
Dear All

i have dynamic generation of <table>
rt now i have done the <TR> with alternate colors which is a dynamic table.
my requirement is that for every cumulative <tr> i need different color.
ex.

<table>
<tr> <td>a</td><td>1</td> </tr>
<tr> <td>b</td><td>2</td> </tr>
<tr> <td>c</td><td>3</td> </tr>
<tr> <td>d</td><td>4</td> </tr>

<tr> <td>sum1</td><td>10</td> </tr>

<tr> <td>e</td><td>1</td> </tr>
<tr> <td>f</td><td>2</td> </tr>
<tr> <td>g</td><td>3</td> </tr>
<tr> <td>h</td><td>4</td> </tr>

<tr> <td>sum2</td><td>10</td> </tr>
</table>

the rows, a,b,c,d have alternate colors.
row sum1 should be differentiated in diff color. how to do this.?????

PraDz

PeejAvery
October 3rd, 2006, 10:22 AM
Create an incrementing integer. When the integer is 1 then color = blue when the integer is 2 set the color to red and reset the integer.