Forums

This topic is locked

Alternate Cell Rows Color

Posted 04 Mar 2002 17:23:55
1
has voted
04 Mar 2002 17:23:55 Phuc Ngo posted:
Does anyone know of an extension that alternate table cell color back and forth?

For ex. the first row would be red the next row would be gray and then back to red and then gray and so on.

Thanks
-Dave

Replies

Replied 04 Mar 2002 17:41:54
04 Mar 2002 17:41:54 Owen Eastwick replied:
Set up your table and repeat region then just modify the <b>tr</b> tag like:
<pre id=code><font face=courier size=2 id=code>
&lt;%
While ((Repeat1__numRows &lt;&gt; 0) AND (NOT RecordsetName.EOF))
%&gt;
&lt;tr &lt;% If Repeat1__numRows Mod 2 Then %&gt;bgcolor="#FF0000"&lt;% Else %&gt;bgcolor="#CCCCCC"&lt;% End If %&gt;&gt;
&lt;td width="69"&gt;&lt;%=(RecordsetName.Fields.Item("Field1".Value)%&gt;&lt;/td&gt;
&lt;td width="40"&gt;&lt;%=(RecordsetName.Fields.Item("Field2".Value)%&gt;&lt;/td&gt;
&lt;td width="32"&gt;&lt;%=(RecordsetName.Fields.Item("Field3".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RecordsetName.MoveNext()
Wend
%&gt;
</font id=code></pre id=code>

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 04 Mar 2002 17:52:00
04 Mar 2002 17:52:00 Phuc Ngo replied:
Thank you again!

Let me go and try it now.

Replied 05 Mar 2002 06:32:27
05 Mar 2002 06:32:27 Steven Tam replied:
there are a number of extensions that does what you want available for download from macromedia.com

Reply to this topic