Changing the main images ALT text when the image changes.
Posted: Mon Feb 23, 2009 3:30 pm
You can use variables ExtraImage0 Alt Text ... ExtraImage6 Alt Text to display ALT text for the icons. If you'd like the main product image's ALT text to follow suit do the following:
Edit layout "Extra Image Table".
Look for the lines:
Replace them with:
Look for the line:
Change this to be:
Look for the line:
Change this to be:
Edit layout "Extra Image Table".
Look for the lines:
Code: Select all
echo "<img width=\"$iconwidth\" height=\"$iconheight\" src=\"$icontouse\"";
echo " alt=\"$alttext\"";
Code: Select all
$alttext = htmlentities($alttext);
echo "<img width=\"$iconwidth\" height=\"$iconheight\" src=\"$icontouse\"";
echo " alt=\"$alttext\" title=\"$alttext\"";
Code: Select all
$mouseovercode .= "document.getElementById('$productimageid').src='$extraimagetouse';";
Code: Select all
$mouseovercode .= "var img=document.getElementById('$productimageid');img.src='$extraimagetouse';img.alt=this.alt;img.title=this.alt;";
Code: Select all
echo " onclick=\"document.getElementById('$productimageid').src='$extraimagetouse'\"";
Code: Select all
echo " onclick=\"var img=document.getElementById('$productimageid');img.src='$extraimagetouse';img.alt=this.alt;img.title=this.alt;\"";