Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Image gallery large photo changes, how do i get link to change

    I have a simple table with a few thumbnailed images on the right with a large image area that changes when user selects other thumbnails. can be seen here http://www.superbrightleds.com/light...b.html#rgbca12 The large image area is a link to go to another page, how do I get that link to change if the user clicks another thumbnail.


    Code:
    <table width="803" height="238" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="411" height="10"><div align="left"><img src="images/roundtable/410tabtop.gif" alt="" width="410" height="17" border="0" /></div></td>
            <td width="333" rowspan="3"><div align="left"><a href="specs/RGB-CA12.htm"><img src="products/lightbars/controllers/rgb-conw.jpg" alt="" name="large" width="333" height="235" border="0" id="large" /></a></div></td>
            <td width="59"><img src="images/roundtable/57tabtop.gif" alt="" width="59" height="17" border="0" /></td>
          </tr>
          <tr>
            <td height="202" background="images/roundtable/410tabside.gif"><div align="center">
                <p><strong class="style87"><strong><strong class="style87">Universal RGB Controllers</strong></strong><br />
                </strong><span class="style51"><br>
                Wireless or Wired versions of RGB Controllers <br>
                controls any of our RGB LED products<br>
                RGB LED Products can be set to one of seven different static colors <br>
                or one of four different speed adjustable flashing patterns </span><br>
                <span class="style51">12VDC operation with  +/- terminals </span><br />
                </p>
                <p><span class="style17"><a href="specs/RGB-CA12.htm"><img onMouseOver='xpe(this,1);' onMouseOut='xpe(this,0);' onMouseDown='xpe(this,2);'id="xpi_r7faa2" src="buttons-files/btr7faa_0.gif" name="vbr7faa" width="98" height="28" border="0" alt="More Info"/></a><a href="/cgi-bin/store/commerce.cgi?product=BARS"><img onMouseOver='xpe(this,4);' onMouseOut='xpe(this,3);' onMouseDown='xpe(this,5);'id="xpi_67faa2" src="buttons-files/bt67faa_0.gif" name="vb67faa" width="98" height="28" border="0" alt="Buy Now"/></a></span></p>
            </div></td>
            <td width="59" background="images/roundtable/57tabside.gif"><table width="0" height="183" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40" height="50"><div align="center"><a href="javascript://"><img src="products/lightbars/controllers/rgb-conwS.jpg" alt="" onmousedown="document.images['large'].src='products/lightbars/controllers/rgb-conw.jpg'" width="40" height="32" border="0" /></a></div></td>
                </tr>
                <tr>
                  <td height="50"><div align="center"><a href="javascript://"><img src="products/lightbars/controllers/rgb-conw_closeS.jpg" alt="" onmousedown="document.images['large'].src='products/lightbars/controllers/rgb-conw_close.jpg'" width="40" height="32" border="0" /></a></div></td>
                </tr>
                <tr>
                  <td height="50"><div align="center"><a href="javascript://"><img src="products/lightbars/controllers/rgb-ca12S.jpg" alt="" onmousedown="document.images['large'].src='products/lightbars/controllers/rgb-ca12.jpg'" width="40" height="32" border="0" /></a></div></td>
                </tr>
                <tr>
                  <td height="50"><div align="center"><a href="javascript://"><img src="products/lightbars/controllers/rgb-ca12_closeS.jpg" alt="" onmousedown="document.images['large'].src='products/lightbars/controllers/rgb-ca12_close.jpg'" width="40" height="32" border="0" /></a></div></td>
                </tr>
    
            </table>

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Add highlighted:
    Code:
    onmousedown="document.images['large'].src='http://www.superbrightleds.com/products/lightbars/controllers/rgb-conw.jpg';document.images['large'].parentNode.href='http://www.google.com';"
    ...this should go all the way down on all those images.

    Hope that helps.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    funkysig (10-30-2008)

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    3
    Thanked 0 Times in 0 Posts
    awesome, that was easy, thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •