Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/05/2008, 05:52
Hereze
 
Fecha de Ingreso: julio-2005
Mensajes: 70
Antigüedad: 19 años, 9 meses
Puntos: 0
Respuesta: Cambiar color de texto si se cumple una condición

Hola he puesto el código que me has pasado, el código donde lista los productos queda así:

Cita:
<%
intRowCount = 0
Do While RS.AbsolutePage = Current_Page And Not RS.EOF

if (intRowCount mod 2) = 0 then
CssClass = "TrOdd"
else
CssClass = "TrRows"
end if


If add_fd5 < add_fd7 then
Response.Write("bgColor='#FFA8AA'")
Else
Response.Write("bgColor='#FFFFFF'")
End If


Response.write "<tr class="""&CssClass&""" onmouseover=""cell_over(this, 'TrHover')"" onmouseout=""cell_out(this)"">"

CellValue = "" & QSFormatNumber(Rs(0),0,-1,0,-1) & ""
Response.Write "<td align=Center >" &CellValue& "</td>"
CellValue = "" & Rs(11) & ""
if CellValue <> "" then
CellValue = replace(Cellvalue,vbCrLf,"<br>")
else
Cellvalue = "&nbsp;"
end if
Response.Write "<td align=Default ><a href="""&"./productos.asp?"&""&"currentrow_fd0=" & QSURLencode(Rs(0)) & ""&"&"&"currentrow_fd1=" & QSURLencode(Rs(5)) & ""&"&"&"currentrow_fd2=" & QSURLencode(Rs(9)) & ""&"&"&"currentrow_fd6=" & QSURLencode(Rs(1)) & ""&"&"&"currentrow_fd7=" & QSURLencode(Rs(2)) & ""&"&"&"currentrow_fd8=" & QSURLencode(Rs(3)) & ""&"&"&"currentrow_fd9=" & QSURLencode(Rs(4)) & ""&""" target=""_self"">" &CellValue& "</a></td>"
CellValue = "" & Rs(14) & ""
if CellValue <> "" then
CellValue = replace(Cellvalue,vbCrLf,"<br>")
else
Cellvalue = "&nbsp;"
end if
Response.Write "<td align=Default >" &CellValue& "</td>"
CellValue = "" & QSFormatNumber(Rs(1),0,-1,0,-1) & ""
Response.Write "<td align=Center >" &CellValue& "</td>"
CellValue = "" & QSFormatNumber(Rs(2),0,-1,0,-1) & ""
Response.Write "<td align=Center >" &CellValue& "</td>"
CellValue = "" & QSFormatNumber(Rs(8),0,-1,0,-1) & ""
Response.Write "<td align=Center >" &CellValue& "</td>"
CellValue = "" & QSFormatNumber(Rs(3),0,-1,0,-1) & ""
Response.Write "<td align=Center >" &CellValue& "</td>"
CellValue = "" & QSFormatNumber(Rs(5),0,-1,0,-1) & ""
Response.Write "<td align=Center >" &CellValue& "</td>"

Response.Write "</tr>"

intRowCount = intRowCount + 1
Rs.MoveNext
Loop
%>
Lo que me ha pasado, es que justo antes de empezar la tabla donde se listan los productos, me sale esto:

bgColor='#FFFFFF'
bgColor='#FFFFFF'

y a continuación la tabla con los productos, todos en color negro.