Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > How to build a Rollover button? View modes: 
User avatar
Member
Member
gary.chan-e-crusade - 6/16/2009 2:26:25 AM
   
How to build a Rollover button?
Hi,

I wanna build a rollover button, I codes as belows:

<script language="Javascript">
if (document.images) {
button1 = new Image
button2 = new Image

button1.src = '<%# GetFileUrl("Image") %>'
button2.src = '<%# GetFileUrl("RolloverImage") %>'
}
</script>

<a href="<%# MyFunctions.ReturnUrlSrc(Eval("Link").ToString()) %>" onmouseover="document.rollover.src=button2.src" onmouseout="document.rollover.src=button1.src"><img src="<%# GetFileUrl("Image") %>" border=0 name="rollover"></a>

However, it is not work and no error message.

Please advices

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2009 7:58:06 AM
   
RE:How to build a Rollover button?
Hi,

Could you please try to use GetElementById function for the javascript and also, could you please check it for null value to see if the image was selected? I hope it will help.


Best Regards,
Juraj Ondrus