Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Adding a link in Lightbox image viewer 2.03

  1. #1
    Join Date
    Sep 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Adding a link in Lightbox image viewer 2.03

    1) Script Title: Lightbox image viewer 2.03

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem:

    I would like to add a link to another web site (in a new window) next to the caption and image number that appear in the box at the bottom of the enlarged image. I believe I need to tweak the lightbox.js file, but I don't know how. Any helper?

    Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  3. #3
    Join Date
    Sep 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Works great, thanks!

  4. #4
    Join Date
    Sep 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Not so fast ...

    Unfortunately there is one problem:

    if I use your code in a slideshow, when I browse from picture to picture using the "PREV" and "NEXT" buttons, only the first enlarged image (the one I triggered by clicking on the thumbnail) shows the link. When I click "NEXT" the new enlargement only displays the image number, not even the title.

    Any idea?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'd try something like so:

    Code:
    <a href="images/image-1.jpg" rel="lightbox[groupname]"
    onmousedown="this.title='<a href=\'http://www.google.com/\'>Google</a>';"
    onmouseout="this.title='<a href=\'http://www.google.com/\'>Google</a>';"
    onmouseover="this.title='';"><img src="images/thumb-1.jpg" width="100" height="40" alt=""></a>
    That should get everything lined up properly for the image grouping routines of the script. You can also add a descriptive title in the onmouseover event if you like and use it (for non-javascript enabled browsers) as the link's title attribute as well.

    Think outside the lightbox.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Sep 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sorry, still not working.

    I implemented the latest code you sent but I'm facing exactly the same problem: only the thumbnail I click on first will show the link in the large window; if I click "NEXT" or "PREV" from there the only information I get in the box underneath is the image number and the close button. No title, no link ...


  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Sep 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Here's a link to the live page:

    http://www.055interactive.com/linktest.html

    It's a test page I created not accessible from the navigation, but will serve the purpose.

    1. Once you are there click on the very last thumb in the lower-right corner
    (xbox), you'll see that the large image will have a link to Google at the bottom.

    2. Now x out of the large image and go back to the thumbs; click on another one, the "Boeing Aero eMagazine" for instance.

    3. As the large version of it shows up, use the "NEXT" button in it to navigate to the Xbox image. Notice how this time, in the gray box beneath the image, only its number is visible (16/16) and nothing else.


    Your help is highly appreciated, thanks!

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your demo works fine here, even after following the procedure you outline in FF 2, Safari 3, IE 7, and Opera 9. Perhaps you need to clear your browser's cache.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Sep 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Mystery solved!

    Apparently the only browser that doesn't like this solution is Safari 2.04 (Mac).
    It works just fine everywhere else, as far as I could tell.

    Thanks for the troubleshooting, John; we both learn something!

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
  •