Hi,
Our designer created code as follows:
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','images/SMtwitter-on.gif',1)"><img src="images/SMtwitter-off.gif" alt="Our Twitter Page" width="26" height="26" id="Image10" /></a>
We built a document type where the user can upload both the "on" (hover) image and the "off" image as well as entering the URL for the image. The upload is a direct uploader form control to upload the two images.
I wanted to use the following code for the transformation:
<a href="<%# Eval("LinkURL") %>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image<%# Eval("SocialMediaLinkID") %>','','<%#GetImage("HoverImage")%>',1)">
<%#GetImage("LinkImage")%></a>
However, it errors on the GetImage() in the onmouseover. And I need to match the image id in the onmouseover to the image id in the <img> tag.
The only way I was to solve this was to use the following:
<a href="<%# Eval("LinkURL") %>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image<%# Eval("SocialMediaLinkID") %>','','<%#GetFileUrl("HoverImage")%>',1)">
<img src='<%#GetFileUrl("LinkImage")%>' id='Image<%# Eval("SocialMediaLinkID") %>' alt='<%#Eval("") %> /> </a>
With this solution though we can't take advantage of the direct uploader's ability to set the image title property. Do you have any suggestions?