RickyGtz
asked on
How do I alternate color of the table rows ??
Hi, I want to change the bgcolor of each contiguos row on my table. One light green and one regular green. How Do I code this?
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="#000000" bordercolordark="#ffffff" class="bodytxt1">
<%
i=0
do while Not rsTourD.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Tournament
Name</b></td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourName")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><strong>Format</strong></td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%=rsTourD("TournamentFormat")%>,played by <%=rsTourD("TourType")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Location</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourLocation")%></td>
</tr>
<% if rsTourD("TourType") = "Individual" then %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Max. Number
of Players</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourNoplayers")%></td>
</tr>
<% End If %>
<% if rsTourD("TourType") = "Teams" then %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Max. Number of
Teams</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("MaxTeams")%></td>
</tr>
<% End If %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Already Signed Up</b> </td>
<td width="61%" height=25 align="left" valign="middle" CLASS="Link2" onfocus="MM_openBrWindow('viewPlayers.asp?TId=<%=rsTourD("TourID")%>','','')"><a href="viewPlayers.asp?TId=<%=rsTourD("TourID")%>" target="_blank">Click Here</a></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Spots
Left </b> </td>
<td height=25 width="61%" align="left" valign="middle" class="errtext"><b><%=rsTourD("AvailableSpots")%></b></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Tournament Fee</b> </td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%
'sql1 = "SELECT * from tournamentfee WHERE fee_id = "& rsTourD("TourNoplayers") &""
'set rsTourD1 = Server.CreateObject("ADODB.Recordset")
'rsTourD1.Open sql1,con,3,3
response.Write("$ ")
'if rsTourD1.pagecount <> 0 then
'response.Write rsTourD1("amount")
'else
'response.Write("0.00")
'end if
response.Write rsTourD("Tourfee")
%> </td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Date</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourStartdate")%>- to -
<%
strdate=rsTourD("TourStartdate")
Nod=rsTourD("TourNodays")
response.write (dateadd("d",Nod,strdate))
%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Time</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("StartingTime")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Last
Date for Registration</b> </td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourLastdatereg")%></td>
</tr>
<tr>
<td height=25 align="left" valign="top" class="bgcolor1"> </td>
<td height=25 align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr> <div>
<td height=25 align="left" valign="top" class="bgcolor1"><b>Description</b></td>
<%
'CoursesTitle = rsTourD("name")
txtBody = "../admin/Tournaments/"&rsTourD("TourDesc")
Const openForReading = 1
set FP = server.createobject("Scripting.FileSystemObject")
NewFileNameLocation = server.mappath(txtBody)
Set F = FP.GetFile(NewFileNameLocation)
set txtstring = F.OpenAsTextStream(openForReading)
Newstring =""
do while Not txtstring.AtEndOfStream
Newstring = Newstring & txtstring.Readline
Loop
txtstring.close
set txtstring = Nothing
set fp =Nothing
set f =Nothing
txtBody = Newstring
%></div>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr>
<td height=33 colspan="2" align="left" valign="top" class="bgcolor1"><%=txtBody%></td>
</tr>
<tr> <div>
<td height=25 align="left" valign="top" class="bgcolor1"><b>Instructions</b></td>
</div>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr>
<td height=25 colspan="2" align="left" valign="top" class="bgcolor1"><%=rsTourD("TourInstructions")%></td>
</tr>
<% i=i+1
rsTourD.Movenext
loop
%>
<td height="20" colspan="2" align="center" valign="middle" class="text">
ASKER
can you look to my code. and tell me what is wrong with the logic i am following.
your tables are all messed up.
What are you trying to accomplish?
What are you trying to accomplish?
try adding this to your code
bgcolor="<%=bgcolor%>"
Should look something like this?
Also, what is the class="bgcolor1" for?
If you are trying to set the bgcolor from CSS then it is going to conflict with your asp code....
bgcolor="<%=bgcolor%>"
Should look something like this?
Also, what is the class="bgcolor1" for?
If you are trying to set the bgcolor from CSS then it is going to conflict with your asp code....
<td bgcolor="<%=bgcolor%>" height=25 align="left" valign="middle" class="bgcolor1"><b>Tournament Name</b></td>
ASKER
Hello carrzkiss , this is what i am trying to do have one light and one dark row.
screenrows.jpg
screenrows.jpg
try this
Once you get your site up and running the way that you want it.
We need to work on getting it coded properly (HTML part, not the ASP)
This example, uses CSS to change the colors of the td's
Not ASP.
Let me know if you need any information on it.
have a good one.
Carrzkiss
Once you get your site up and running the way that you want it.
We need to work on getting it coded properly (HTML part, not the ASP)
This example, uses CSS to change the colors of the td's
Not ASP.
Let me know if you need any information on it.
have a good one.
Carrzkiss
<style type="text/css">
<!--
.bodytxt1{
width:100%;
}
.bodytxt1 .bgcolor{
background-color:#CC3300;
}
.bodytxt1 .bgcolor1{
background-color:#FF6633;
}
.bodytxt1 .errtext{
background-color:#FF0000;
}
.bodytxt1 .Link2{
background-color:#6633FF;
}
-->
</style>
<table border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="#000000" bordercolordark="#ffffff" class="bodytxt1">
<%
i=0
do while Not rsTourD.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Tournament
Name</b></td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourName")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><strong>Format</strong></td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%=rsTourD("TournamentFormat")%>,played by <%=rsTourD("TourType")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Location</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourLocation")%></td>
</tr>
<% if rsTourD("TourType") = "Individual" then %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Max. Number
of Players</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourNoplayers")%></td>
</tr>
<% End If %>
<% if rsTourD("TourType") = "Teams" then %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Max. Number of
Teams</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("MaxTeams")%></td>
</tr>
<% End If %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Already Signed Up</b> </td>
<td width="61%" height=25 align="left" valign="middle" CLASS="Link2" onfocus="MM_openBrWindow('viewPlayers.asp?TId=<%=rsTourD("TourID")%>','','')"><a href="viewPlayers.asp?TId=<%=rsTourD("TourID")%>" target="_blank">Click Here</a></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Spots
Left </b> </td>
<td height=25 width="61%" align="left" valign="middle" class="errtext"><b><%=rsTourD("AvailableSpots")%></b></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Tournament Fee</b> </td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%
'sql1 = "SELECT * from tournamentfee WHERE fee_id = "& rsTourD("TourNoplayers") &""
'set rsTourD1 = Server.CreateObject("ADODB.Recordset")
'rsTourD1.Open sql1,con,3,3
response.Write("$ ")
'if rsTourD1.pagecount <> 0 then
'response.Write rsTourD1("amount")
'else
'response.Write("0.00")
'end if
response.Write rsTourD("Tourfee")
%> </td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Date</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourStartdate")%>- to -
<%
strdate=rsTourD("TourStartdate")
Nod=rsTourD("TourNodays")
response.write (dateadd("d",Nod,strdate))
%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Time</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("StartingTime")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor"><b>Last
Date for Registration</b> </td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourLastdatereg")%></td>
</tr>
<tr>
<td height=25 align="left" valign="top" class="bgcolor"> </td>
<td height=25 align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr> <div>
<td height=25 align="left" valign="top" class="bgcolor"><b>Description</b></td>
<%
'CoursesTitle = rsTourD("name")
txtBody = "../admin/Tournaments/"&rsTourD("TourDesc")
Const openForReading = 1
set FP = server.createobject("Scripting.FileSystemObject")
NewFileNameLocation = server.mappath(txtBody)
Set F = FP.GetFile(NewFileNameLocation)
set txtstring = F.OpenAsTextStream(openForReading)
Newstring =""
do while Not txtstring.AtEndOfStream
Newstring = Newstring & txtstring.Readline
Loop
txtstring.close
set txtstring = Nothing
set fp =Nothing
set f =Nothing
txtBody = Newstring
%></div>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr>
<td height=33 colspan="2" align="left" valign="top" class="bgcolor1"><%=txtBody%></td>
</tr>
<tr> <div>
<td height=25 align="left" valign="top" class="bgcolor"><b>Instructions</b></td>
</div>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr>
<td height=25 colspan="2" align="left" valign="top" class="bgcolor"><%=rsTourD("TourInstructions")%></td>
</tr>
<% i=i+1
rsTourD.Movenext
loop
%>
<td height="20" colspan="2" align="center" valign="middle" class="text">
</td></table>
ASKER
yes, I wanted to keep same layout that screenshoot.
Can you go to see the page with the code you prvide me.,?
http://www.playerscores.net/tournament/tour_detail.asp?TId=33
Can you go to see the page with the code you prvide me.,?
http://www.playerscores.net/tournament/tour_detail.asp?TId=33
OK.
The image that you have provided is it from a Dynamic page?
If so, then it is scripted like the Demo that I provided for you.
http://www.pcitdad.com/Test/EE/Q_24156128/Q_24156128.asp
If it is not Dynamic - Then it is like the source code that i provided in my last post.
Dynamic - Shows only records that are written from a database.
Let me know, and I can further assist.
But either way, you have 2 examples that you can use to accomplish what it is that you need.
The image that you have provided is it from a Dynamic page?
If so, then it is scripted like the Demo that I provided for you.
http://www.pcitdad.com/Test/EE/Q_24156128/Q_24156128.asp
If it is not Dynamic - Then it is like the source code that i provided in my last post.
Dynamic - Shows only records that are written from a database.
Let me know, and I can further assist.
But either way, you have 2 examples that you can use to accomplish what it is that you need.
ASKER
not sure waht you mean
I can post code for page showed on screenshoot.
here it is
I can post code for page showed on screenshoot.
here it is
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sqlConn1.asp" -->
<%
' Converted to SQL 2000 Already
Dim rsTourSQL
Dim rsTourSQL_cmd
Dim rsTourSQL_numRows
Set rsTourSQL_cmd = Server.CreateObject ("ADODB.Command")
rsTourSQL_cmd.ActiveConnection = MM_sqlConn1_STRING
rsTourSQL_cmd.CommandText = "SELECT * FROM dbo.tblTournament WHERE TourVerify = 1 ORDER BY TourStartdate Desc"
rsTourSQL_cmd.Prepared = true
Set rsTourSQL = rsTourSQL_cmd.Execute
rsTourSQL_numRows = 0
%>
<% level="../"%>
<!--#include file="../include/intialize.inc"-->
<!--include file="../include/connection.asp"-->
<html>
<head>
<title><%=PageTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../style/style.css" rel="stylesheet" type="text/css">
</head>
<body background="<%=level%>images/bg.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><!--#include file="../include/header.asp"--></td>
</tr>
<tr>
<td width="423" valign="top" bgcolor="#ffffff">
<%
if (session("username")<>"") then
%>
<!--#include file="../include/loggedmenu.asp"--> <%
end if
%> <br>
<br>
<table border="0" cellspacing="0" cellpadding="0" align="center" class="bodytxt1" style="width: 732px; height: 89px">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td width="28" style="width: 16px"><img src="<%=Level%>images/tbleft.jpg" width="28" height="24"></td>
<td width="240" class="tableheader1">Tournaments</td>
<td width="416" bgcolor="#FFFFFF"><img src="<%=Level%>images/tbright.jpg" width="28" height="24"></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" bgcolor="#5eb020">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td valign="top" bgcolor="#FFFFFF" class="tablebgcolor">
<table width="70%" height="100%" align="center" cellpadding="5" cellspacing="0" class="bodytxt1" >
<tr align="left">
<td width="50%" class="tableheader" > Up and Coming
</td>
<td width="50%" align="right" class="tableheader" ><a href="Javascript:history.go(-1);" class="Link2">Back</a></td>
</tr>
<tr align="center" >
<td colspan="2" >
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="#000000" bordercolordark="#ffffff" class="bodytxt1" >
<%i=0
do while Not rsTourSQL.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr BGCOLOR="<%=bgcolor%>">
<td height=25 colspan="2" align="left" valign="middle" class="">
</td>
<td height=25 width="32%" align="left" valign="middle" class="">
<%TourStartdate=rsTourSQL("TourStartdate")%>
<%=monthname(month(TourStartdate),3)%> <%=day(TourStartdate)%>-
<%=year(TourStartdate)%></td>
<td height=25 width="53%" align="left" valign="middle" class=""><A CLASS="Link1" href="<%=level%>tournament/tour_detail.asp?TId=<%=rsTourSQL("TourID")%>"><%=rsTourSQL("TourName")%> more...
</a> </td>
<td height=25 width="13%" align="left" valign="middle" class="">
</td>
</tr>
<tr>
<% i=i+1
rsTourSQL.Movenext
loop
%>
<td height="20" colspan="2" align="center" valign="middle" class="text">
</td>
<td height="20" width="32%" align="center" valign="middle" class="text"></td>
<td height="20" width="53%" align="center" valign="middle" class="text"></td>
<td height="20" width="13%" align="center" valign="middle" class="text">
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<p> </p></td>
<!--<td width="161" valign="top" bgcolor="#FFFFFF"><!--include file="../include/right.asp"--</td>-->
</tr>
<tr>
<td colspan="3"><!--#include file="../include/footer.asp"--></td>
</tr>
</table>
<% rsTourSQL.close
set rsTourSQL = nothing
' con.close
'set con = nothing
%>
</body>
</html>
ASKER
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="#000000" bordercolordark="#ffffff" class="bodytxt1" >
<%i=0
do while Not rsTourSQL.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr BGCOLOR="<%=bgcolor%>">
<%i=0
do while Not rsTourSQL.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr BGCOLOR="<%=bgcolor%>">
This is just like my Demo that I provided.
Please look at this section here, this is what you need
What you are hunting for is this?
<tr BGCOLOR="<%=bgcolor%>">
Now.
This only works if it is Dynamic. (Like this script is, this is retrieving all it's records from the
Database and showing them to the page.)
So.
If the page that you are using in this Topic is not Dynamic, then it is not going to work for you.
As it is going to write the same information to every Cell.
So.
If the page is not Dynamic.
Then use CSS like I have demostrated in the source code above.
If it is Dynamic, then re-use this source code form here.
Please look at this section here, this is what you need
What you are hunting for is this?
<tr BGCOLOR="<%=bgcolor%>">
Now.
This only works if it is Dynamic. (Like this script is, this is retrieving all it's records from the
Database and showing them to the page.)
So.
If the page that you are using in this Topic is not Dynamic, then it is not going to work for you.
As it is going to write the same information to every Cell.
So.
If the page is not Dynamic.
Then use CSS like I have demostrated in the source code above.
If it is Dynamic, then re-use this source code form here.
<%
' Converted to SQL 2000 Already
Dim rsTourSQL
Dim rsTourSQL_cmd
Dim rsTourSQL_numRows
Set rsTourSQL_cmd = Server.CreateObject ("ADODB.Command")
rsTourSQL_cmd.ActiveConnection = MM_sqlConn1_STRING
rsTourSQL_cmd.CommandText = "SELECT * FROM dbo.tblTournament WHERE TourVerify = 1 ORDER BY TourStartdate Desc"
rsTourSQL_cmd.Prepared = true
Set rsTourSQL = rsTourSQL_cmd.Execute
rsTourSQL_numRows = 0
%>
<table width="70%" height="100%" align="center" cellpadding="5" cellspacing="0" class="bodytxt1" >
<tr align="left">
<td width="50%" class="tableheader" > Up and Coming
</td>
<td width="50%" align="right" class="tableheader" ><a href="Javascript:history.go(-1);" class="Link2">Back</a></td>
</tr>
<tr align="center" >
<td colspan="2" >
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="#000000" bordercolordark="#ffffff" class="bodytxt1" >
<%i=0
do while Not rsTourSQL.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr BGCOLOR="<%=bgcolor%>">
<td height=25 colspan="2" align="left" valign="middle" class="">
</td>
<td height=25 width="32%" align="left" valign="middle" class="">
<%TourStartdate=rsTourSQL("TourStartdate")%>
<%=monthname(month(TourStartdate),3)%> <%=day(TourStartdate)%>-
<%=year(TourStartdate)%></td>
<td height=25 width="53%" align="left" valign="middle" class=""><A CLASS="Link1" href="<%=level%>tournament/tour_detail.asp?TId=<%=rsTourSQL("TourID")%>"><%=rsTourSQL("TourName")%> more...
</a> </td>
<td height=25 width="13%" align="left" valign="middle" class="">
</td>
</tr>
<tr>
<% i=i+1
rsTourSQL.Movenext
loop
%>
<td height="20" colspan="2" align="center" valign="middle" class="text">
</td>
<td height="20" width="32%" align="center" valign="middle" class="text"></td>
<td height="20" width="53%" align="center" valign="middle" class="text"></td>
<td height="20" width="13%" align="center" valign="middle" class="text">
</td>
</tr>
</table>
</td>
</tr>
</table>
ASKER
>>then re-use this source code form here.>>>>>
well , I think I need assitance on making this I get
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/tournament/tour_detail.as p, line 0
though it seems it will do what i need,
well , I think I need assitance on making this I get
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/tournament/tour_detail.as
though it seems it will do what i need,
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="#000000" bordercolordark="#ffffff" class="bodytxt1">
<%i=0
do while Not rsTourD.Eof
bgcolor=""
if (i mod 2)=0 then bgcolor="#EEF9DD"
%>
<tr BGCOLOR="<%=bgcolor%>">
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Tournament
Name</b></td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourName")%></td>
</tr>
<tr>
<% i=i+1
rsTourD.Movenext
loop
%>
<td height=25 align="left" valign="middle" class="bgcolor1"><strong>Format</strong></td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%=rsTourD("TournamentFormat")%>,played by <%=rsTourD("TourType")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Location</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourLocation")%></td>
</tr>
<% if rsTourD("TourType") = "Individual" then %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Max. Number
of Players</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourNoplayers")%></td>
</tr>
<% End If %>
<% if rsTourD("TourType") = "Teams" then %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Max. Number of
Teams</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("MaxTeams")%></td>
</tr>
<% End If %>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Already Signed Up</b> </td>
<td width="61%" height=25 align="left" valign="middle" CLASS="Link2" onfocus="MM_openBrWindow('viewPlayers.asp?TId=<%=rsTourD("TourID")%>','','')"><a href="viewPlayers.asp?TId=<%=rsTourD("TourID")%>" target="_blank">Click Here</a></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Spots
Left </b> </td>
<td height=25 width="61%" align="left" valign="middle" class="errtext"><b><%=rsTourD("AvailableSpots")%></b></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Tournament Fee</b> </td>
<td height=25 align="left" valign="middle" class="bgcolor1"><%
'sql1 = "SELECT * from tournamentfee WHERE fee_id = "& rsTourD("TourNoplayers") &""
'set rsTourD1 = Server.CreateObject("ADODB.Recordset")
'rsTourD1.Open sql1,con,3,3
response.Write("$ ")
'if rsTourD1.pagecount <> 0 then
'response.Write rsTourD1("amount")
'else
'response.Write("0.00")
'end if
response.Write rsTourD("Tourfee")
%> </td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Date</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourStartdate")%>- to -
<%
strdate=rsTourD("TourStartdate")
Nod=rsTourD("TourNodays")
response.write (dateadd("d",Nod,strdate))
%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Time</b></td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("StartingTime")%></td>
</tr>
<tr>
<td height=25 align="left" valign="middle" class="bgcolor1"><b>Last
Date for Registration</b> </td>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"><%=rsTourD("TourLastdatereg")%></td>
</tr>
<tr>
<td height=25 align="left" valign="top" class="bgcolor1"> </td>
<td height=25 align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr> <div>
<td height=25 align="left" valign="top" class="bgcolor1"><b>Description</b></td>
<%
'CoursesTitle = rsTourD("name")
txtBody = "../admin/Tournaments/"&rsTourD("TourDesc")
Const openForReading = 1
set FP = server.createobject("Scripting.FileSystemObject")
NewFileNameLocation = server.mappath(txtBody)
Set F = FP.GetFile(NewFileNameLocation)
set txtstring = F.OpenAsTextStream(openForReading)
Newstring =""
do while Not txtstring.AtEndOfStream
Newstring = Newstring & txtstring.Readline
Loop
txtstring.close
set txtstring = Nothing
set fp =Nothing
set f =Nothing
txtBody = Newstring
%></div>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr>
<td height=33 colspan="2" align="left" valign="top" class="bgcolor1"><%=txtBody%></td>
</tr>
<tr> <div>
<td height=25 align="left" valign="top" class="bgcolor1"><b>Instructions</b></td>
</div>
<td height=25 width="61%" align="left" valign="middle" class="bgcolor1"> </td>
</tr>
<tr>
<td height=25 colspan="2" align="left" valign="top" class="bgcolor1"><%=rsTourD("TourInstructions")%></td>
</tr>
<tr>
<td height=25 colspan="2" align="center" class="bgcolor1"> </td>
</tr>
<tr> <%T_name=rsTourD("TourName")
T_Id=rsTourD("TourID")
session("S_Tname") = T_name
session("T_id") = T_Id
%>
<td height=25 colspan="2" align="center" class="bgcolor1">
<%
tourFormat = rsTourD("TourType").value
if tourFormat = "Individual" then %>
<form name="frm" method="post" action="registerplayer.asp">
<input type="hidden" name="T_name" value="<%=T_name%>">
<input type="hidden" name="T_ID" value="<%=T_Id%>">
<% else %>
<form name="frm" method="post" action="pre-register.asp">
<input type="hidden" name="T_name" value="<%=T_name%>">
<input type="hidden" name="T_ID" value="<%=T_Id%>">
<!-- <td height=25 align="center" class="errtext"><b> -->
<% end if %>
<%
dim cmd
set cmd = Server.CreateObject("AdoDB.Command")
'dim cn
'set cn = Server.CreateObject("AdoDb.Connection")
'cn.connectionString = MyconnectionString
set cmd.ActiveConnection = ConSQL
cmd.CommandText = "Select AvailableSpots From tblTournament WHERE TourID = " & request.querystring("TId") & ""
if cmd.Execute().fields(0).Value > 0 then
cmd.Execute
%>
<input type="image" border="0" name="imageField" class="imginput" src="<%=Level%>images/reg.jpg">
<% else
' MaxNumberTeams = rsTourD("MaxTeams")
' if MaxNumberTeams <20 then
response.Write(" Sorry, Tournament is Full")
' set availabilty from table tounrament = false
'conSQL.execute("update tblTournament set availabilty = 1 where maxnumberTeams="&RefNumber&"")
end if %>
</form> </td>
</tr>
</table> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table> </td>
<!--<td width="161" valign="top" bgcolor="#FFFFFF"><!--include file="../include/right.asp"--</td>
-->
ASKER
I am getting there
watch
first row is light but nochanges after
http://www.playerscores.net/tournament/tour_detail.asp?TId=33
watch
first row is light but nochanges after
http://www.playerscores.net/tournament/tour_detail.asp?TId=33
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HI you are right. I got your point now. Since this list is not dynamic.I have to define each <tr> bgcolor separately.
Thanks
Thanks
ASKER
Cool
you are welcome Ricky.
http://www.pcitdad.com/Test/EE/Q_24156128/Q_24156128.asp
Source Code
http://www.pcitdad.com/Test/EE/Q_24156128/Q_24156128.zip
Let me know if you have any issues.
Carrzkiss