that's easy enough, create a style sheet with a class for a standard row and one for a selected row then when you are outputting the data check the values and and if it should be selected set the class of the row to the appropriate style else leave it with the default style...
okie, you a simpler version....assuming you are building the table by looping through a recordset or something....
Do while not myRecordset.EOF
bgcolor = "#FFFFFF"
if myRecordset("value1")=0 then bgcolor="#CCCCCC"
fp_sQry="SELECT * FROM AlarmView WHERE (NameAlarm like 'NeaxAlarm%' AND NameEquip LIKE 'TAX%')"
fp_sNoRecords="<tr><td colspan=4 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
i have played around and been able to get it to color the whole severity colum one color, but still cannot get it to change based on the rows value. Also was hopefully wanting the color to go across the whole row if possible which currently i am unable to do.
*** Edited to add screenie and also add the code into code box.
all good ive completed the page the code i used was
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"
and then added this to the where the tables were drawn after the query of the database
Thanks for your initial help anyways much appreciated
Last edited by ashrak; 09-23-04 at 21:14.
Reason: Adding code into code box