• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. All Fueled Up: The Best of Se... > Rollover, Fido1; Rollover, Fido2

Rollover, Fido1; Rollover, Fido2

Although it’s most common to see text fields be a part of a repeat region, you can, of course, include images. Many result pages from a catalog search include both a text and visual description of the items sought after. Now, let’s say you want to get really fancy and add rollover effects to those images. Sounds simple enough, right? You just assign a Swap Image behavior and specify a data field from your recordset as the src attribute for the second image. Unfortunately, the Swap Image behavior won’t work without tweaking the image name (not the src) to make it unique for every item. Here’s what the original rollover code looks like:

<a href="javascript:;" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image1','','<%=(rsCat.Fields.Item("imageover").Value)%',0)">
<img name="Image1" border="0"
src="<%=(rsCat.Fields.Item("image").Value)%>">


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint