Solved

Creating alternating row colors

Posted on 2007-11-14
3
738 Views
Last Modified: 2009-03-20
WIN XP PRO
MS Access
DWMX
Classic ASP VBScript

Hello.  I have a standard DWMX Repeat Region on a table row.  How can I use Classic ASP VBScript to alternate the rows' colors for better visibility?

Thank you,
Shane
0
Comment
Question by:lshane
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
samic400 earned 250 total points
ID: 20287308
mSwitch = 0

do while not mRS.EOF
    if mSwitch = 0 then
         response.write "<tr><td style='background-color:#CCCCCC'>"
         mSwitch = 1
      else
         response.write "<tr><td style='background-color:#FFFFFF'>"
         mSwitch = 0
     end if
   mRs.Movenext
Loop


0
 
LVL 25

Assisted Solution

by:imitchie
imitchie earned 250 total points
ID: 20288152
row = 0
do while not mRS.EOF
  ....
      response.write "<tr class='row"&row&"'>"
      row = (row + 1) mod 2
 ....
   mRs.Movenext
loop

and make sure your css has the classes tr.row0 and tr.row1
0
 

Author Comment

by:lshane
ID: 20293403
Thanks samic400 and imitchie.  I appreciate it.

That did the trick (A couple of different ways).


Thanks so much,
Shane
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question