I want to alternate row colors using this script:
%26lt;% DIM iRecordCount
iRecordCount = 0
DO WHILE NOT rsCAInv.EOF
IF iRecordCount Mod 2 = 0 THEN
%%26gt;
%26lt;TR bgcolor="#CCCCCC"%26gt;
%26lt;TD%26gt; %26lt;% rsCAInv("Item") %%26gt; %26lt;/TD%26gt; %26lt;/TR%26gt;
%26lt;% else %%26gt;
%26lt;TR bgcolor="white"%26gt;
%26lt;TD%26gt; %26lt;% rsCAInv("Item") %%26gt; %26lt;/TD%26gt; %26lt;/TR%26gt;
%26lt;/Table%26gt;
%26lt;% end if
iRecordCount = iRecordCount + 1
rsCAInv.MoveNext
Loop
%%26gt;
But I already have this in my ASP page and it was put there as a repeating region by Dreamweaver. I can't seem to figure out how to use them both at the same time.
%26lt;% While ((Repeat1__numRows %26lt;%26gt; 0) AND (NOT rsCAInv.EOF)) %%26gt;
%26lt;TR bgcolor="#CC9966"%26gt;
%26lt;td%26gt;%26lt;div align="center"%26gt;%26lt;%=(rsCAInv.Fields.Item("...
%26lt;%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsCAInv.MoveNext()
Wend
%%26gt;
%26lt;/table%26gt;%26lt;/td%26gt;%26lt;/tr%26gt;
Those are not all the columns in the table, but I don't have enough room to paste the whole thing. Can anyone help me here? Thanks!
How do I add this script to my ASP page when I'm using Dreamweaver?
Just replace the two repeating region code blocks with the one code block that begins DIM IRecordCount.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment