Skip to main content

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>
Original Post

Replies sorted oldest to newest

Add Reply

Copyright © 1999-2018 Auctiva.com. All rights reserved.
×
×
×
×
Link copied to your clipboard.
×