Skip to main content
Inspiring
May 1, 2006
Question

Rollover in Dynamic List?

  • May 1, 2006
  • 1 reply
  • 275 views
HI everyone, I have a search results page which returns 10 results per page. I would A. like an alternate coloured background per line and B. to change to a third colour on mouseover returning to original on mouseout.
Can anyone advise me as to the best way to do this. I am using ASP, MySQL and Dreamweaver MX.

Thanks in advance

JohnA
This topic has been closed for replies.

1 reply

Inspiring
May 2, 2006
Create the table and repeating region, and check it works ok, then in code
try replacing the single TR tag at the start of the row with all of this:

<% If rowcolour = "pink" Then %>
<tr bgcolor="#FFCCFF" onmouseover="style.backgroundColor='#CCCCCC'"
onmouseout="style.backgroundColor='#FFCCFF'">
<% rowcolour = "yellow" %>
<% Else %>
<tr bgcolor="#FFFFCC" onmouseover="style.backgroundColor='#CCCCCC'"
onmouseout="style.backgroundColor='#FFFFCC'">
<% rowcolour = "pink" %>
<% End If %>

The rowcolour names are just variables, the HEX values are what you'll need
to change. Be careful of editing - watch the single and double quotes.

HTH,
Piers


Inspiring
May 2, 2006
Hi Piers,
Thanks for your reply. I was unable to get the 'rowcolour 'part to work as yet but the 'mouseover/out' works like a charm. I will continue to try and may post the error message if unsuccesfull.
Thanks again for your help