Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Lightbox image viewer 2.03

  1. #1
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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 don't really have a problem, the script is great and works great. I just had a question about it. Is there any way to add a link to in the caption? So if I had an image...and I wanted to put a caption called view testimonial, and have users be able to click it and it would bring up the testimonials page for that image. Thanks for any help you can offer.

    Jason

  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

    Default

    You could just put the link in the title attribute (both examples modified from and tested with the distribution's demo index.html page):

    Code:
    <a href="images/image-1.jpg" rel="lightbox" title="<a href='http://www.google.com/'>Google</a>"><img src="images/thumb-1.jpg" width="100" height="40" alt="" /></a>
    But, that will show up in some browsers as a tool tip onmouseover of the trigger and looks strange when it does. So, this works out better:

    Code:
    <a href="images/image-1.jpg" rel="lightbox" onmousedown="this.title='<a href=\'http://www.google.com/\'>Google</a>';" onmouseout="this.title='';"><img src="images/thumb-1.jpg" width="100" height="40" alt="" /></a>
    Note: Be careful to follow the quoting and escaping syntax shown.
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Your second option works great thank you. Just one more thing regarding that... I need a link in there, and you showed me how to do that, is there a way to have both text and a link though? I need some text that is not a link, and text that is a link. Is there something I can add to it to allow this? Here is my code using the code you showed me:

    <a href="images/exthouse1.jpg" rel="lightbox" title= "title" onmousedown="this.title='<a target=\'_blank/\' href=\'http://www.google.com/\'>Google</a>';" onmouseout="this.title='';">
    <img src="images/exthouse1thumb.jpg" width="100" height="100" alt="" border="8" style="border-style: solid; border-color: #BCAB77" /></a>

    Thanks for your help. =)

  4. #4
    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

    You have some extra stuff (red):

    Code:
    <a href="images/exthouse1.jpg" rel="lightbox" title= "title" onmousedown="this.title='<a target=\'_blank/\' href=\'http://www.google.com/\'>Google</a>';" onmouseout="this.title='';">
    <img src="images/exthouse1thumb.jpg" width="100" height="100" alt="" border="8" style="border-style: solid; border-color: #BCAB77" /></a>
    I don't think it will hurt anything. But, if you lost the space after, it would. Best to get rid of it. As for your question, you can just add any text in there that you like (showing only the onmousedown - that's all that changes):

    Code:
    onmousedown="this.title='For more info, try: <a target=\'_blank/\' href=\'http://www.google.com/\'>Google</a>, they\'re great!';"
    Be sure to continue escaping single quotes/apostrophes (') as shown.
    - John
    ________________________

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

  5. #5
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello Everyone,

    i know this thread is very old, but i have a little Question. I add these Lines into my dokument and it works fine.

    <a href="images/FDGUbanner.jpg" rel="lightbox[linksammlung]" onmousedown="this.title='<a href=\'http://www.fdgu.de/\'>click here to visit fdgu</a>';" onmouseout="this.title='';">
    <a href="images/v1rus_kills_10.gif" rel="lightbox[linksammlung]" onmousedown="this.title='<a href=\'http://www.google.com/\'>Google</a>';" onmouseout="this.title='';"><img src="images/v1rus_kills_10.gif" width="191" height="166" alt="" border="0"></a>

    But at every displayed image, the hyperlink of google will be shown. How can I show a different hyperlink at each image?

    For each help i´m very pleased (and sorry for may bad english)

  6. #6
    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

    Use the new updated version:

    http://www.dynamicdrive.com/dynamici...box2/index.htm

    In it, the title attribute of your rel="lightbox" link will be the text of the caption displayed in lightbox pop up box/viewer. The rev attribute (if used) of your rel="lightbox" link will be the href of the caption link.

    Much simpler, really - ex:

    Code:
    <a href="images/image-1.jpg" rel="lightbox" title="my caption" rev="http://www.dynamicdrive.com">image #1</a>
    - John
    ________________________

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

  7. #7
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Perfect. Many Many THX

  8. #8
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    Unhappy pls help...

    I tried everything %85 completed. But I have only 1 problem...

    So,


    - I added link ...But When I try to click that link its opening in the same page..I want to open different page. Because I want to use second page,different picture for print option...

    here is my code ;

    Code:
    <div class="thumbsBox">
    			<a href="slides/M-1316-US.jpg" rel="lightbox[roadtrip]" title="<a href='http://www.koaka.com'>Print Size</a>"><img src="thumbs/M-1316-US.jpg" width="53" height="80" border="0"><div>M-1316-US</div></a></div>
    Its mean I want to open second page like as POP-UP...

    Thx a lot...
    Last edited by jscheuer1; 02-26-2008 at 06:51 PM. Reason: add code tags

  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

    Quote Originally Posted by ApranaX View Post
    I tried everything %85 completed. But I have only 1 problem...

    So,


    - I added link ...But When I try to click that link its opening in the same page..I want to open different page. Because I want to use second page,different picture for print option...

    here is my code ;

    Code:
    <div class="thumbsBox">
    			<a href="slides/M-1316-US.jpg" rel="lightbox[roadtrip]" title="<a href='http://www.koaka.com'>Print Size</a>"><img src="thumbs/M-1316-US.jpg" width="53" height="80" border="0"><div>M-1316-US</div></a></div>
    Its mean I want to open second page like as POP-UP...

    Thx a lot...
    You really should use the updated version of the script and modify it to accept target, see:

    http://www.dynamicdrive.com/forums/s...ad.php?t=28841

    However, if you want to keep using the method you are currently employing:

    Code:
    <a href="slides/M-1316-US.jpg" rel="lightbox[roadtrip]" title="<a target='_blank' href='http://www.koaka.com'>Print Size</a>"><img sr . . .
    - John
    ________________________

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

  10. #10
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Thk you you are perfect..you solved my problem...

    I dont know how will I upgrade I am afraid of that I will damage everything..I dont know If I dont updated the version do I live any problem ?

    I have another problem with print option...

    Thx again...
    Last edited by ApranaX; 02-26-2008 at 07:10 PM.

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
  •