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
    Jan 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to hyperlink target image in Set Image gallery?

    I am using GoLive.

    I have a series of thumbnail images that enlarge on the same page on rollover. How do I give each enlarged image its own hyperlink?

    In the head is:

    CSAct[/*CMP*/ 'c38dc8ed62'] = new Array(CSSetImageURL,/*CMP*/ 'credit',/*URL*/ '../../pagelements/dfphoto.jpg');

    So then in the body "dfphoto.jpg" is linked to http://derekfowlesphotography.com:

    td class="dsR136 dsR175"><a href="http://derekfowlesphotography.com" target="_blank"><img src="../../pagelements/dfphoto.jpg" alt="" name="credit" width="13" height="139" border="0" /></a></td>

    That works, but then how do I assign different links to the other images when they are opened in the "credit" spot?



    I have a feeling this is a common question, and have tried searches, but probably not using the right terms...

  • #2
    Regular Coder Actinia's Avatar
    Join Date
    Feb 2007
    Location
    Essex, UK
    Posts
    250
    Thanks
    1
    Thanked 23 Times in 22 Posts
    You can have a container div (with id="credit", say) containing several divs each of which is hidden by default (display="none").

    You then have a series of thumbnails each of which has an onclick that sets one of these target divs display property to "block".

    Each of your divs would have a format such as:
    Code:
    <div class="switch" id="div1">
    <a href="url1"><img src="image1.jpg" width = ... /></a>
    </div
    The style for class switch would be:
    Code:
    .switch { display: none;}
    Each thumbnail would have the form:
    Code:
    <a href="#" onclick="showItem("div1");" ><img src="Thumb1.jpg" /></a>
    The code for showItem would be:
    Code:
    function showItem() {
    document.getElementByID.style.display="block";
    return false;
    }
    You would also need some code to hide the display of any previous div, but that will depend on the context.

    This code has not been tested.

    John Rostron

  • #3
    New Coder
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you so much.

    Looks like you have dealt with this question before! I will try this out as soon as I can and will let you know how it goes. Thank you very much for taking the time to write such a thorough reply.


  •  

    Posting Permissions

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