ASPX templates
Version 5.x > ASPX templates > Image mouseover error View modes: 
User avatar
Member
Member
dhopp-successforall - 4/4/2011 10:38:06 AM
   
Image mouseover error
I am working on an aspx page that has some images with the desire to have a mouseover/mouseout action. I have the following line in my aspx page:

<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','', ‘~/SFAF/media/_images/header_1_lit.gif',1)"><img src="~/SFAF/media/_images/header_1.gif" name="Image6" width="557" height="47" border="0" id="Image6" alt="Powerful Instruction" /></a>


The “header_1.gif” image shows fine, but when I mouse over the image, I get the standard red X placeholder image for a missing image. I coded the mouseover image directly into the page to make sure it could be found and it can be. When I view the source of the image in Kentico, I get the following as the path for the missing mouseover image: http://[servername]/KenticoCMS/cms/getdoc/ee7a86c1-a6dd-4495-bffb-d496ae87af57/KenticoCMS/SFAF/media/_images/header_1_lit.gif

No matter how I code the path to the mouseover image, all I get is the red X placeholder image. Please advise!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 4/5/2011 10:45:14 AM
   
RE:Image mouseover error
Hello,

Have you tried to paste the link to the image into a browser if it is displayed correctly?
I would also recommend you to debug the mentioned section with some debugging tool like Firebug (here) for Firefox or Web development tools (here) for IE.

Best regards,
Boris Pocatko

User avatar
Member
Member
dhopp-successforall - 4/5/2011 10:52:07 AM
   
RE:Image mouseover error
Yes I have checked to see if it would show correctly. I wrote that in my original post. I did figure it out this morning. It seems that using the relative path of ~/sfaf/blahblahblah does not work in the mouseover script. I had to put the absolute path for the mouseover image of /kenticocms/sfaf/blahblahblah. The relative path works fine for the first image but not the mouseover. I'm not sure 100% if it is the script or the script with kentico. I tried another script and it also did not work without the absolute path, so I'm leaning to the script with however Kentico retrieves files.