View Full Version : Thumnail Viewer 2 [Show then click]

06-27-2007, 12:02 AM
1) Script Title: Thumbnail Viewer 2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: I need to be able to preview a picture by mousing over a link, and then be able to click on the link (not the picture) and open up another page.

in addition to coding help, if you have a physical solution to this problem that would help too :)

Thank you!

06-28-2007, 06:22 AM
Try this. Inside the .js file, find the line:

if (!pagelinks[i].getAttribute("onClick"))
pagelinks[i]["onclick"]=function(){ //Cancel default click action

The line in red is new. Then, inside the HTML for the activating thumbnail link, do the following:

<a href="http://www.nasa.gov/images/content/167040main_image_feature_738_ys_4.jpg" rel="enlargeimage::mouseover" rev="loadarea::http://www.dynamicdrive.com" onClick="location='http://cnn.com'; return false" title="This is an example">Thumbnail Example 1</a>

In this case, clicking on the thumbnail would go to CNN.com