HI everyone, here is my question and I hope it isn't or it hasn't been posted before, probably it has but I spent a few minutes looking through the forums and with the search feature and nothing could solve or help me with my problem so here I go.
I have an ASP page where I have a "Repeat region" which is populated dinamycally from a Database, everything works perfectly, the thing is that I thought it would be cool to fill a row or to set its background color (for that single row) if the value of one of the fields = something in particular, and I've tried making a function that changes the style through VBscript and Java Script then trying to call the function each time or on every single line on the repeat region with no luck so far, of course I am doing something wrong so please any help is appreciated.
Here is an example of the repeat region that I have:
Note that the third and fourth recordset results have on their "class" tag an attempt to call either a JavaScript or a VBscript function, again, with no luck...
<% While ((Repeat1__numRows <> 0) AND (NOT rs_selecciona_prestamos.EOF)) %>
<tr>
<td class="style6"><div align="center"><a href="registro_actividad_edita.asp?loan_id=<%=rs_s elecciona_prestamos("id_file")%>"><img src="images/edit_loan.gif" width="22" height="23" border="0" /></a></div></td>
<td class="style6"><div align="center"><a href="registro_actividad_log.asp?loan_id=<%=rs_sel ecciona_prestamos("id_file")%>"><img src="images/loans_log.gif" width="20" height="24" border="0" /></a></div></td>
<td class="Call CambiaEstilos()"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("last_name").Value)%><%=(rs_selecciona_presta mos.Fields.Item("name").Value)%></div></td>
<td class="return CambiaEstilos()"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("address").Value)%></div></td>
<td class="style6"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("PRCO").Value)%></div></td>
<td class="style6"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("PSI").Value)%></div></td>
<td class="style6"><div align="center"><%= FormatCurrency((rs_selecciona_prestamos.Fields.Ite m("loan_amount").Value), 2, -2, -2, -2) %></div></td>
<td class="style6"><div align="center"><%= FormatCurrency((rs_selecciona_prestamos.Fields.Ite m("earning").Value), 2, -2, -2, -2) %></div></td>
<td class="style6"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("lender").Value)%></div></td>
<td class="style6"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("closing_date").Value)%></div></td>
<td class="style6"><div align="center"><%=(rs_selecciona_prestamos.Fields. Item("loan_status").Value)%></div></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_selecciona_prestamos.MoveNext()
Wend
%>
It is not event worth it for me to post the functions Ive been using since they are really guessings on how to do it, but probably you already got the idea and if there is something missing please let me know so I can edit the this text and clarify some doubts if that helps you to give me a hand....
Thanks
Marco
Probably I am not even doing in the right way, it must be a way to do it so I hope to get any leads or tips.