
Originally Posted by
sinapra
are you using dotnet technology or plain ASP? I am not sure how it could be done in plain ASP but in dotnet, its possible? can you let me know, I will in the meanwhile try to see if there is any possibility in ASP.
after much frustration over the last couple of days posting on several forums etc i finally played around and read enough on the web to develop the code myself.
to answer your question i am using plain asp, and it is possible as i have done it. below is the code:
this was added after the db query but before the tables are drawn and data inserted.
Code:
<%
x = CINT(FP_FieldVal(fp_rs,"Severity"))
if x <= 10 then
bgcolor = "#E42217"
elseif x => 11 and x <= 30 then
bgcolor = "orange"
elseif x => 31 and x <= 50 then
bgcolor = "yellow"
elseif x => 51 and x <= 70 then
bgcolor = "#82CAFF"
elseif x => 71 and x <= 90 then
bgcolor = "#41A317"
end if
%>
this was added to where the tables were drawn after the db has been queried.
Code:
<td BGCOLOR=<%=bgcolor%>>
Thanks for your reply though, i must say this and dbforums are the only two of the 5 forums i posted in i had a responce in.
Thanks heaps
final shot of the working site is attached
Bookmarks