Avatar of Stiebel Eltron
Stiebel Eltron
Flag for Thailand asked on

How to create alternate row color?

<body bgproperties="fixed" bgcolor="#000000" onLoad="javascript:startmenu()">

	Dim myConnection
	Dim rsUsers
	Dim connectString
	Dim sqlString
	Dim requestName


	Set myConnection = Server.CreateObject("ADODB.Connection")
	Set rsUsers = Server.CreateObject("ADODB.Recordset")

	myConnection.Open connectString


	sqlString = "Select * From users ORDER BY ID ASC"
	Set rsUsers = myConnection.Execute(sqlString)


<table width="760" border="0" cellspacing="3" cellpadding="1">
    <td width="134"><img src="../IMG/logo_res.jpg" alt="STIEBEL ELTRON" /></td>
    <td width="620" valign="top" bgcolor="#666666"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="548" height="197">
      <param name="movie" value="homeintro20.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <embed src="homeintro20.swf" quality="high" wmode="opaque" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="548" height="197"></embed>
    <td width="134" bgcolor="#FFFFFF"><img src="../IMG/white_square.png" alt="ASIA" border="0" align="top"/></td>
    <td bgcolor="#666666">&nbsp;</td>
    <td align="right" bgcolor="#999999"><font face="Verdana, Geneva, sans-serif" color="#ffffff">
   '// If user is logged in show name and logout link
   If Session("loggedin") = true Then
      Response.Write "Welcome: " & Session("FName")
      Response.Write "<br /><a href=""../asia2/login/logout.asp"">Logout</a>"
      Response.Write "<a href=""../ste-iphoto-login2.asp"" title=""CLICK TO LOGIN"">REGISTERED USERS</a>"
   End If
    <td bgcolor="#666666" align="center">&nbsp;</td>
    <td bgcolor="#999999">&nbsp;</td>
    <td align="left" bordercolor="#999999" bgcolor="#000000"><img src="../IMG/admin_panel.jpg" width="548" /><br></td>
    <td bgcolor="#999999" valign="top" align="center">&nbsp;
    <td colspan="3" bgcolor="#FFFFFF">
    <table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#999999">
            	<td class="td1" bgcolor="#CCCCCC">ID</td>
                <td class="td1" bgcolor="#CCCCCC">ID</td>
               	<td class="td1" bgcolor="#CCCCCC">FIRST NAME</td>
            	<td class="td1" bgcolor="#CCCCCC">LAST NAME</td>
                <td class="td1" bgcolor="#CCCCCC">EMAIL</td>
                <td class="td1" bgcolor="#CCCCCC">PASSWORD</td>
                <td class="td1" bgcolor="#CCCCCC">COUNTRY</td>
                <td class="td1" bgcolor="#CCCCCC">TELEPHONE</td>
                <td class="td1" bgcolor="#CCCCCC">MOBILE</td>
                <td class="td1" bgcolor="#CCCCCC">COMPANY</td>
                <td class="td1" bgcolor="#CCCCCC">ADDRESS</td>
                <td class="td1" bgcolor="#CCCCCC">STATUS</td>
            <!--Get DATA-->      
		do while not rsUsers.EOF
            	<td class="td2"><a href="javascript:myPopup('edit_user.asp?USERID=<%=rsUsers("ID")%>', 'EDITUSER','960','600','10','300')"><img src="../IMG/edit_icon_small.png" alt="EDIT USER" border="0"/></a></td>
                <td class="td2"><%=rsUsers("ID")%></td>
               	<td class="td2"><%=rsUsers("FName")%></td>
            	<td class="td2"><%=rsUsers("LName")%></td>
                <td class="td2"><%=rsUsers("Email")%></td>
                <td class="td2"><%=rsUsers("Password")%></td>
                <td class="td2"><%=rsUsers("Country")%></td>
                <td class="td2"><%=rsUsers("Telephone")%></td>
                <td class="td2"><%=rsUsers("Mobile")%></td>
                <td class="td2"><%=rsUsers("Company")%></td>
                <td class="td2"><%=rsUsers("Address")%></td>
                <td class="td2"><%=rsUsers("Status")%></td>
		<% rsUsers.MoveNext %>
<%loop %><!--Next Row-->

Open in new window

Dear EE experts,

We would like to ask for tech support on how to create alternating row color.
We tried some stuff from the web, but we failed to create one...
Here's the link of the site that we would like to have alternating row color:

Thank you...
ASPJavaScriptWeb Development

Avatar of undefined
Last Comment
Kiran Paul VJ

8/22/2022 - Mon
Atique Ansari

You can use CSS3. Find below URL for more details.

Atique Ansari

Kiran Paul VJ

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Stiebel Eltron

Both are best solution...

Thank you!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Kiran Paul VJ

Glad to know it helped.

Stiebel Eltron

@Kiranvj, thanks for the support :)
Scott Fell

Just a note if you are going to use this for any html5 stuff, you will want to use a css class instead of the row background color if you care about validation.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Kiran Paul VJ

Just a addon to padas, if you are using html5, defenitly css3 will be working in that browser. So you can try CSS3 even/odd feature. As of now it will not support in all browsers, hence not recommended.