Results 1 to 2 of 2

Thread: Thumnail Viewer 2 [Show then click]

  1. #1
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thumnail Viewer 2 [Show then click]

    1) Script Title: Thumbnail Viewer 2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try this. Inside the .js file, find the line:

    Code:
    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:

    Code:
    <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

Bookmarks

Posting Permissions

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