Apprentice
Posted
February 25, 2007 05:27 AM
By request, here is an image swapping script that you can use in your custom templates. To see how this script works with images, refer to one of my
closed auctions .
<script language=JavaScript>
var img_array = [
"[IMAGE1] ",
"[IMAGE2] ",
"[IMAGE3] ",
"[IMAGE4] ",
"[IMAGE5] ",
"[IMAGE6] ",
"[IMAGE7] ",
"[IMAGE8] "];
</script>
<table width="700" border="0" align="center" id="auc_images">
<tr>
<td align="center"> </td>
<td align="center"> <font size=2>Click images below for larger view</font>
</td>
</tr>
<tr>
<td valign="top" align="center" width="450" height="325" id="img_preview">
[IMAGE1] </td>
<td align="center" valign="top">
<table border="0">
<tr>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(0);return false;">
<img src="[IMAGE1_URL400x300]" width="100" alt="" border="0"> </a>
</td>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(1);return false;">
<img src="[IMAGE2_URL400x300]" width="100" alt="" border="0"> </a>
</td>
</tr>
<tr>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(2);return false;">
<img src="[IMAGE3_URL400x300]" width="100" alt="" border="0"> </a>
</td>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(3);return false;">
<img src="[IMAGE4_URL400x300]" width="100" alt="" border="0"> </a>
</td>
</tr>
<tr>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(4);return false;">
<img src="[IMAGE5_URL400x300]" width="100" alt="" border="0"> </a>
</td>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(5);return false;">
<img src="[IMAGE6_URL400x300]" width="100" alt="" border="0"> </a>
</td>
</tr>
<tr>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(6);return false;">
<img src="[IMAGE7_URL400x300]" width="100" alt="" border="0"> </a>
</td>
<td valign="top"> <a href="#" onclick="BB_swapLargeImage(7);return false;">
<img src="[IMAGE8_URL400x300]" width="100" alt="" border="0"> </a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="javascript">
function BB_swapLargeImage(img_index) {
document.getElementById('img_preview').innerHTML = img_array[img_index];
}
</script>
Premier Poster
Thank you so VERY much
Newbie
I'm having trouble implementing this in a template. I've pasted the script into one of the Auctiva templates but even when I apply it to a listing I'm not getting any images.
Here is the practiceboard link
http://www.practiceboard.com/?5670779 -- Sean Dallas Used Guitar