|
 |
asp_databases thread: Re: Alternating colors in table row
Message #1 by Martin Lee <access@o...> on Sun, 07 Apr 2002 00:59:49 +0800
|
|
Another way:
<%
Dim CellColor
While Not objRs.EOF
If CellColor =3D "#F0F8FF" Then
CellColor =3D "#FFFFFF"
Else
CellColor =3D "#F0F8FF"
End If
Response.Write "<tr bgcolor=3D""" & CellColor & """>"
Response.Write "</tr>"
objRs.MoveNext
Wend
%>
Martin
At 03:42 4/4/2002 +0200, you wrote:
>Just put it like this:
>
><%
>Dim num
>num =3D 0
>
>Do While Not objRS.EOF
>
> Response.Write "<tr bgcolor=3D"""
> if num mod 2 =3D 0 then
> Response.Write "#B3C3D4"
> Else
> Response.Write "#FFFFFF"
> End IF
> Response.Write """>"
>%>
>
>' HERE YOU PUT YOUR TABLE
>
> </tr>
><%
>num =3D num + 1
>objRS.MoveNext
>Loop
>%>
>
>Hope this will help you! =3D)
>--
>Martin Johansson,
>CEO & Project Supervisor
>SD-Studios
>+46 (0)70-3003320
><http://www.sd-studios.com/>http://www.sd-studios.com
>-----Ursprungligt meddelande-----
>Fr=E5n: Earljon K. A. Hidalgo [mailto:earl@p...]
>Skickat: den 4 april 2002 12:24
>Till: ASP Databases
>=C4mne: [asp_databases] Alternating colors in table row
>
>Hello Member!
>
>Just like to ask how can i make a table that has an alternate color
>display of table rows?
>Any help would be appreciated.
>
>TIA
>---------
>Earljon K. A. Hidalgo
>"Never give up on what you really want to do. The person with big dreams
>is more powerful than one with all the facts."-- Life's Little Instruction
>Calendar
>
Message #2 by Aftab Ahmad <aftab.ahmad@k...> on Thu, 4 Apr 2002 13:07:06 +0200
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1DBC8.DB903DD0
Content-Type: text/plain;
charset="iso-8859-1"
In previous mail there was an error in below code, now it's ok.
-----Original Message-----
From: Aftab Ahmad
Sent: 4. april 2002 12:47
To: ASP Databases
Subject: [asp_databases] RE: Alternating colors in table row
With ASP u can do like this:
<%
Dim cnt
cnt=0
While NOT objRS.EOF
IF cnt =0 Then
Response.Write "<tr bgcolor=""#F3F3F3"">"
cnt=1
Else
Response.Write "<tr>"
cnt=0
End If
Response.Write "<td>" & objRS("name") & "</</td>" & "<td>" &
objRS("telephone") & "</</td></tr>"
objRS.MoveNext()
Wend
objRS.Close
Set objRS = Nothing
%>
Aftab Ahmad
-----Original Message-----
From: imran.saleem@b... [mailto:imran.saleem@b...]
Sent: 4. april 2002 12:19
To: ASP Databases
Subject: [asp_databases] RE: Alternating colors in table row
<TABLE BORDER=1>
<TR>
<TD BGCOLOR=white>DDFGDFGDF</TD>
<TD BGCOLOR=blue>DDFGDFGDF</TD>
<TD BGCOLOR=black>DDFGDFGDF</TD>
</TR>
</TABLE>
-----Original Message-----
From: Earljon K. A. Hidalgo [mailto:earl@p...]
Sent: Thursday, April 04, 2002 11:24 AM
To: ASP Databases
Subject: [asp_databases] Alternating colors in table row
Hello Member!
Just like to ask how can i make a table that has an alternate color display
of table rows?
Any help would be appreciated.
TIA
---------
Earljon K. A. Hidalgo
"Never give up on what you really want to do. The person with big dreams is
more powerful than one with all the facts."-- Life's Little Instruction
Calendar
---
---
---
Message #3 by Aftab Ahmad <aftab.ahmad@k...> on Thu, 4 Apr 2002 12:46:56 +0200
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1DBC6.0A0C9990
Content-Type: text/plain;
charset="iso-8859-1"
With ASP u can do like this:
<%
Dim cnt
cnt=0
While NOT objRS.EOF
IF cnt =0 Then
Response.Write "<tr bgcolor=""#F3F3F3"">"
cnt=1
Else
Response.Write "<tr>"
cnt=0
End If
%>
Response.Write "<td>" & objRS("name") & "</</td>" & "<td>" &
objRS("telephone") & "</</td></tr>"
<%
objRS.MoveNext()
Wend
objRS.Close
Set objRS = Nothing
%>
Aftab Ahmad
-----Original Message-----
From: imran.saleem@b... [mailto:imran.saleem@b...]
Sent: 4. april 2002 12:19
To: ASP Databases
Subject: [asp_databases] RE: Alternating colors in table row
<TABLE BORDER=1>
<TR>
<TD BGCOLOR=white>DDFGDFGDF</TD>
<TD BGCOLOR=blue>DDFGDFGDF</TD>
<TD BGCOLOR=black>DDFGDFGDF</TD>
</TR>
</TABLE>
-----Original Message-----
From: Earljon K. A. Hidalgo [mailto:earl@p...]
Sent: Thursday, April 04, 2002 11:24 AM
To: ASP Databases
Subject: [asp_databases] Alternating colors in table row
Hello Member!
Just like to ask how can i make a table that has an alternate color display
of table rows?
Any help would be appreciated.
TIA
---------
Earljon K. A. Hidalgo
"Never give up on what you really want to do. The person with big dreams is
more powerful than one with all the facts."-- Life's Little Instruction
Calendar
---
---
Message #4 by "Earljon K. A. Hidalgo" <earl@p...> on Thu, 4 Apr 2002 18:24:16 +0800
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0032_01C1DC05.EDD68250
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Member!
Just like to ask how can i make a table that has an alternate color
display of table rows?
Any help would be appreciated.
TIA
---------
Earljon K. A. Hidalgo
"Never give up on what you really want to do. The person with big dreams
is more powerful than one with all the facts."-- Life's Little
Instruction Calendar
Message #5 by imran.saleem@b... on Thu, 4 Apr 2002 11:18:33 +0100
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1DBC2.133EB6A0
Content-Type: text/plain;
charset="iso-8859-1"
<TABLE BORDER=1>
<TR>
<TD BGCOLOR=white>DDFGDFGDF</TD>
<TD BGCOLOR=blue>DDFGDFGDF</TD>
<TD BGCOLOR=black>DDFGDFGDF</TD>
</TR>
</TABLE>
-----Original Message-----
From: Earljon K. A. Hidalgo [mailto:earl@p...]
Sent: Thursday, April 04, 2002 11:24 AM
To: ASP Databases
Subject: [asp_databases] Alternating colors in table row
Hello Member!
Just like to ask how can i make a table that has an alternate color display
of table rows?
Any help would be appreciated.
TIA
---------
Earljon K. A. Hidalgo
"Never give up on what you really want to do. The person with big dreams is
more powerful than one with all the facts."-- Life's Little Instruction
Calendar
---
|
|
 |