Results 1 to 2 of 2

Thread: Image Jump?

  1. #1
    Join Date
    Apr 2005
    Posts
    7

    Image Jump?

    Hi, I want to make a web page with thumbnails along the side and when you click on them you will see a larger image of that thumbnail in the center of the same page. I'm a little rusty and unsure of how to do it. ANy help is appreciated.

  2. #2
    Join Date
    Mar 2005
    Posts
    127
    Hi
    You could do it with javascript or flash.
    I haven't tested this code, so I don't know if it works, but give it a try.

    Put this in your <head> element, below anything else in there:
    Code:
    <script>
    function loadImg(url) {
        var bigImg = document.getElementById("bigImg");
        bigImg.src = url;
    }
    </script>
    Put this kind of thing where you want the thumbnails:
    Code:
    <a href="javascript:void(loadImg('big_1.jpg'))">
        <img src="tn_1.jpg" alt="Thumbnail image 1" />
    </a>
    <a href="javascript:void(loadImg('big_2.jpg'))">
        <img src="tn_2.jpg" alt="Thumbnail image 1" />
    </a>
    And this where you want your full image:
    Code:
    <img src="big_1.jpg" alt="Full image" id="bigImg" />

    Without some kind of server-side script you must upload seperate image files for the thumbnail and the full image (for example, here I used big_1.jpg and tn_1.jpg).
    Hope this helps.

Posting Permissions

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