Why do you need Javascript if all you want to do is color the text? You can very well use CSS to do the same.
<html>
<head>
<title>Example</title>
</head>
<body>
<table style="border: 1px solid green; color: red">
<tr>
<td>Hello to all</td>
<td>This is some dummy text</td>
</tr>
</table>
</body>
</html>
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
Seeing that you are using ASP, you can use the ASP constructs to do selective rendering.
<html>
<head>
<style>
.wrong
{
color: red;
}
.right
{
color: green;
}
</style>
<title>Example</title>
</head>
<body>
<table style="border: 1px solid green;">
<tr>
<%
dim i
for i = 1 to 6
if text = 'NO' then
response.write("<td class='wrong'>" & text & "</td>")
else
response.write("<td class='right'>" & text & "</td>")
end if
next
%>
</tr>
</table>
</body>
</html>
Though I am not sure on the ASP code I have written, this is pretty much what you would have to do. This will be either Javascript code or ASP code depending on where the data is coming form i.e. client side or server side.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
It would be really better if you post the same question with the CSS solution I have provided to you to the ASP.NET section since this has ceased to be a CSS problem and is more of ASP thing.
Once you get what you are looking for, using the class attributes and applying the style of your choice is pretty easy.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734