Mouseover Sample Code for eGuide
Novell Cool Solutions: Tip
By Andrey Karyagin
Digg This -
Slashdot This
Posted: 4 Jan 2006 |
Problem
A reader recently asked the following question ...
"Hopefully someone can point me in the right direction. We have the "SV_FindAtrributeShowTD" in our UIHandlers.xsl, but I want to incorporate a "mouseover" function that would display another .GIF if the user moves the mouse over the .GIF image. Can anyone help me with this?"
Here's a code solution from Andrey Karagyin ...
Solution
You can try the following sample code to switch beteen find_16.gif and view.gif for "onmouseover"/"onmouseout" events. It works fine for me with a browser version of at least IE 6.0, SP1. You can replace view.gif here with your own GIF file if necessary.
<xsl:template name="SV_FindAttributeShowTD"> <td class="ValueText"> <xsl:for-each select="."> <xsl:value-of select="value"/> <xsl:if test="value != ''"> <xsl:text> </xsl:text> <a href="eGuide?Action=List.get&attr1={name}&crit1=sw&val1={value}&max=20&User.context={/Novell/eGuide/User.context}&Object.uid={/Novell/eGuide/detail/object/object.uid}" target="nav"> <img id="findimg" src="{/Novell/eGuide/ThemePath}find_16.gif" border="0" width="16" height="16" alt="{$FindOthersWithTheSameLabel}" onmouseover="document.forms[0].findimg.src='{/Novell/eGuide/ThemePath}view.gif'" onmouseout="document.forms[0].findimg.src='{/Novell/eGuide/ThemePath}find_16.gif'"/> </a> </xsl:if> </xsl:for-each> </td> </xsl:template>

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com