473,493 Members | 4,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Please help me change color in my code

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>
Jul 19 '05 #1
2 1689
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

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
"chichi" <ch***********@yahoo.com> wrote in message
news:81**************************@posting.google.c om...
.. . .
<FONT COLOR="00FF00" ...


should be

<FONT COLOR="#00FF00" ...

HTH,
Phill W.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
4496
by: wired | last post by:
Hi, I've just taught myself C++, so I haven't learnt much about style or the like from any single source, and I'm quite styleless as a result. But at the same time, I really want nice code and I...
14
2118
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left...
7
3569
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
1
1427
by: Mark | last post by:
Hi all I can write basic VBA code. I have on problem, I have a tbl with the following fields: lngempID - Name - Password - IN This is for a logon form once the user logon I want the field IN to...
16
4426
by: David Ford | last post by:
I have a macro that I use across the board for freeing ram. I'd like to clean up my code so I don't get these warnings. #define sfree(x) _internal_sfree((void **)&x) #define _internal_sfree(x)...
2
2036
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
3
4237
by: prabhupr | last post by:
Hi Folks Not sure if this is the right group, if not please re-direct me to the right one. Here is my question =============== When I compile my ASP.NET WEB project from VS 2005 (.NET...
1
9582
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
22
2142
by: KitKat | last post by:
I need to get this to go to each folders: Cam 1, Cam 2, Cam 4, Cam 6, Cam 7, and Cam 8. Well it does that but it also needs to change the file name to the same folder where the file is being...
1
2272
by: glenn123 | last post by:
Hi, i am just about out of time to produce a working jukebox which has to perform these functions: to play music files when a track is chosen from a list which when the user presses the change genre...
0
7118
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7192
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.