Jan 26, 2005 #1 rosebud289 Programmer Joined Jan 13, 2005 Messages 25 Location US I am retrieving info from a database into a table. How can I highlight every other row in the table for the number of records displayed? Thanks!
I am retrieving info from a database into a table. How can I highlight every other row in the table for the number of records displayed? Thanks!
Jan 26, 2005 #2 Sheco Programmer Joined Jan 3, 2005 Messages 5,457 Location US If you are building the table from a Recordset you could do this: Code: <Table> <% Do While Not oRS.EOF if (strColor = "f8f8f8") then strColor = "eeeeee" else strColor = "f8f8f8" end if %> <tr> <td bgcolor="<%= strColor%>"> <%= oRS("Field1")%> </td> <td bgcolor="<%= strColor%>"> <%= oRS("Field2")%> </td> </tr> <% oRS.MoveNext Loop %> </Table> Upvote 0 Downvote
If you are building the table from a Recordset you could do this: Code: <Table> <% Do While Not oRS.EOF if (strColor = "f8f8f8") then strColor = "eeeeee" else strColor = "f8f8f8" end if %> <tr> <td bgcolor="<%= strColor%>"> <%= oRS("Field1")%> </td> <td bgcolor="<%= strColor%>"> <%= oRS("Field2")%> </td> </tr> <% oRS.MoveNext Loop %> </Table>
Jan 26, 2005 #3 Tarwn Programmer Joined Mar 20, 2001 Messages 5,787 Location US From the search tab above: thread333-792152 Upvote 0 Downvote