Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

font change in results

Posted 12 Apr 2002 10:32:46
1
has voted
12 Apr 2002 10:32:46 steve roberts posted:
i am using the following code to generate different color rows in my results page. can someone tell me how to alternate the font color at the same time.


<%
Dim RecordCounter
RecordCounter = 0
%>

<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr bgcolor=
<%
RecordCounter = RecordCounter + 1
If RecordCounter Mod 2 = 1 Then
Response.Write "#ffd01f"
Else
Response.Write "#ab7e06"
End If
%>
>

regards

steve

Replies

Replied 13 Apr 2002 13:47:32
13 Apr 2002 13:47:32 Viktor Farcic replied:
Use CSS to define row. In a CSS style you can specify background, font color... Something like:
<%
Dim RecordCounter
RecordCounter = 0
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr class="
<%
RecordCounter = RecordCounter + 1
If RecordCounter Mod 2 = 1 Then
Response.Write "style1"
Else
Response.Write "style2"
End If
%>
">

regards

steve




Viktor Farcic

TalkZone Manager

Reply to this topic