www.webdeveloper.com
Results 1 to 2 of 2

Thread: Image to TWO links?

Hybrid View

  1. #1
    Join Date
    Dec 2002
    Posts
    6

    Image to TWO links?

    I have a general question about linking two actions from one click. I have a Javascript program that displays several thumbnails in a table and then displays the "full-size" image in a larger cell at the top of the table when you click on the thumb. Problem is I now have about 30 images in the table and you have to scroll back up to the top of the page to see the full-size image? You with me so far?

    I want to link the thumbnail to an anchor link "#top" at the top of the page, so when you click on the thumbnail it will display the larger image in the cell at the top of the table and it will also return to the top of the page to the "#top" anchor, so you don't have to scroll up the page after clicking on the image. (How's that for a run on sentence?) Is this possible?

    Here's an example of what I have in the table now. (This is the code for the smaller image, when you click on this link it will display the same image--"1.jpg"--at a larger ratio in the top of the table.) I also want this to link to "#top" if possible.

    <div align="center"><a href="javascript:doPic('1.jpg');"><img src="1.jpg" width="90" height="60" border="0"></a></div>

    Thanks....

  2. #2
    Join Date
    Nov 2002
    Posts
    984

    Re: Image to TWO links?

    Originally posted by villenuv27
    [B]I have a general question about linking two actions from one click. I have a Javascript program that displays several thumbnails in a table and then displays the "full-size" image in a larger cell at the top of the table when you click on the thumb.
    Why don't you use a <frame> or <iframe> instead?

    That way you don't need to rely on JS for it to work and you will be able to display both the full view imgage as well as the thumbnail list, whereever your visitor is at in the list.

    Alternativly you could also use CSS to place the thumbnails in a scrollable section of the page, all while the large image remains visable all the time.

    For inspiration look at this page eg
    http://hem.bredband.net/stehus/logd/home.html
    // Stefan Huszics

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles