Image to TWO links?

admin

Administrator
Staff member
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?<br />
<br />
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?<br />
<br />
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.<br />
<br />
<div align="center"><a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:doPic('1.jpg');"><img src=http://www.webdeveloper.com/forum/archive/index.php/"1.jpg" width="90" height="60" border="0"></a></div><br />
<br />
Thanks....<!--content-->Originally posted by villenuv27 <br />
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. <br />
<br />
Why don't you use a <frame> or <iframe> instead?<br />
<br />
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.<br />
<br />
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.<br />
<br />
For inspiration look at this page eg<br />
<!-- m --><a class="postlink" href="http://hem.bredband.net/stehus/logd/home.html">http://hem.bredband.net/stehus/logd/home.html</a><!-- m --><!--content-->
 
Back
Top