Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Rollover in Dynamic List?

Explorer ,
May 01, 2006 May 01, 2006
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
TOPICS
Server side applications
275
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2006 May 02, 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


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2006 May 02, 2006
LATEST
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines