Please help me change color in my code

C

chichi

Hi there!
I was wondering if somebody could tell me how to edit the following
ASP code so that the text within the tables appears as Font Color
"00FF00". Right now it is appearing in BLACK and since I want the
background to be black, it kind of poses a problem. :0 Also, if
possible, could you tell me how to change the color of the spaces
inside the table?
Thanks in advance!
Chichi
HERE IS THE CODE:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY BGCOLOR="BLACK">

<FONT COLOR="00FF00" FACE="ADMUI3Lg">

<%
Function CleanStr(x)
CleanStr = Replace(x, "'", "''")
End Function

if Request.Form("doSearch") = "yes" and
len(Trim(Request.Form("mySearch") & "")) > 0 then
'Response.Write "|||" & Request.Form("mySearch") & "|||<BR>"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode = 3
Conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" &
"C:\mydb.mdb"
if Request.Form("Type") = 1 then
'str = "select * from artist,cd,song where songlyrics LIKE ""*" &
CleanStr(Request.Form("mySearch")) & "*"" and song.cdid=cd.cdid and
artist.artistid=cd.artistid order by artist.artistid"
str = "select * from (song left join cd ON cd.cdid = song.cdid)
left join artist ON artist.artistid = cd.artistid where songlyrics
LIKE ""%%" & CleanStr(Request.Form("mySearch")) & "%%"""


'"select * from artist,cd,song where songlyrics LIKE ""%%" &
CleanStr(Request.Form("mySearch")) & "%%"" and song.cdid=cd.cdid and
artist.artistid=cd.artistid order by artist.artistid"

Set rst = Conn.Execute(str)

if rst.eof then
strOutput = "Nothing Found - " & str
else
'found songs.....

strOutput = "<table border=1><tr><td>Artist</td><td>Album
Name</td><td>Song Title</td></tr>"
while not rst.eof
strOutput = strOutput & "<tr><td>" & rst("ArtistName") &
"</td><td>" & rst("CDName") & "</td><td><a href=""lyrics.asp?a=" &
rst("SongID") & """>" & rst("SongName") & "</a></td></tr>"
rst.movenext
wend
rst.close
strOutput = strOutput & "</table>"
end if
else
if Request.Form("Type") = 2 then

str = "select * from (song left join cd ON cd.cdid = song.cdid)
left join artist ON artist.artistid = cd.artistid where
artist.artistname LIKE ""%%" & CleanStr(Request.Form("mySearch")) &
"%%"""
Set rst = Conn.Execute(str)


strOutput = "<table border=1><tr><td>Artist</td><td>Album
Name</td><td>Song Title</td></tr>"
while not rst.eof
strOutput = strOutput & "<tr><td>" & rst("ArtistName") &
"</td><td>" & rst("CDName") & "</td><td><a href=""lyrics.asp?a=" &
rst("SongID") & """>" & rst("SongName") & "</a></td></tr>"
rst.movenext
wend
rst.close
strOutput = strOutput & "</table>"

else
str = "select * from (song left join cd ON cd.cdid = song.cdid)
left join artist ON artist.artistid = cd.artistid where cd.cdname LIKE
""%%" & CleanStr(Request.Form("mySearch")) & "%%"""
Set rst = Conn.Execute(str)


strOutput = "<table border=1><tr><td>Artist</td><td>Album
Name</td><td>Song Title</td></tr>"
while not rst.eof
strOutput = strOutput & "<tr><td>" & rst("ArtistName") &
"</td><td>" & rst("CDName") & "</td><td><a href=""lyrics.asp?a=" &
rst("SongID") & """>" & rst("SongName") & "</a></td></tr>"
rst.movenext
wend
rst.close
strOutput = strOutput & "</table>"
end if

end if
set rst=nothing
conn.close
set conn=nothing
' str = "Select * FROM Song where SongLyrics=""*" &
CleanStr(Request.Form("mySearch")) & "*"";"
'Response.Write str


end if
%>

<form method="post" action="index.asp">
<INPUT id="mySearch" name="mySearch">
<input type="hidden" name="doSearch" value="yes">
<SELECT id=select1 name="Type">
<OPTION selected value=1>Lyrics</OPTION>
<OPTION value=2>Artist</OPTION>
<OPTION value=3>CD Title</OPTION>
</SELECT>
<INPUT id=submit1 type=submit value=Submit name=submit1>
</form>
<%=strOutput%><BR>


</FONT>
</BODY>
</HTML>
 
E

Evertjan.

chichi wrote on 15 jan 2004 in microsoft.public.inetserver.asp.general:
I was wondering if somebody could tell me how to edit the following
ASP code so that the text within the tables appears as Font Color
"00FF00". Right now it is appearing in BLACK and since I want the
background to be black, it kind of poses a problem. :0 Also, if
possible, could you tell me how to change the color of the spaces
inside the table?

This is totally off topic, because ASP is serverside and has no colours!

Put this in your <head></head>:

<style>
table tr td {color:#00ff00;background-color:black;}
</style>

please follow up on a clientside NG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,142
Messages
2,570,820
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top