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

Thread: Image Thumbnail Viewer II open image _BLANK

  1. #1
    Join Date
    May 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer II open image _BLANK

    1) Script Title: Image Thumbnail Viewer II

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

    3) Describe problem: When I click on enlarged image its link is opened in target ="_self", I need a new window _blank to open. It is possible? I have not modified the js file and this is my code for each image:

    <a href="upload_img/'.$dettagli[2].'" rel="enlargeimage" rev="targetdiv:loadarea,link:upload_img/'.$dettagli[2].', trigger:mouseover" title=""><img src="upload_img/'.$dettagli[2].'" title="" width="160" style="margin-bottom:10px;"/></a>';

    I've just read other threads, but they seems not to work.

    Thanks for the attenction

    Ratto84

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

    Default

    Try finding the below line inside the .js file, and add to it the part in red:

    Code:
    imghtml='<a href="'+setting.link+'" target="_new">'+imghtml+'</a>'
    DD Admin

  3. #3
    Join Date
    May 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Angry

    Thanks for your help, but I've just read this solution in another post, but it doesn't work.
    Have you got some other solution? Thanks a lot for your help and attenction!

    Ratto84

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

    Default

    Hmm works for me. I've attached the modified .js file below.
    DD Admin

  5. #5
    Join Date
    May 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy

    Thanks DDAdmin, i've tried with you js file, but nothing seems to change. I don't know what to do... I'm not practice in javascript... Have you got some other ideas? Or also an idea of what can make this function not working?

    Thanks again for your precious help

    Ratto84

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

    Default

    Please post a link to the page on your site that contains the with the modified .js file so we can check it out.
    DD Admin

  7. #7
    Join Date
    May 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    The page is this: http://www.guitarplanet.it/new/produ...dettagli%3E%3E and the js file used is the one you have sent to me. The function that open the full resolution image is activated only for the first image. If you need some other info or details feel you free to ask them.

    Thanks a lot,

    Ratto84

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

    That page is still using the unmodified script.
    - John
    ________________________

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

  9. #9
    Join Date
    May 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Oh sorry, now the page is using the modified js file. Thanks John

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

    So, all fixed then? I don't think so. I just checked the page again and as far as I can tell, it's still using the unmodified script.

    Even with the unmodified script, it appears as though only the first image has a link property set for it in its rev attribute anyway.

    And it:

    Code:
    <a href="upload_img/FENDER_STRATOCASTER_66_firemist_silver_Custom_shop_ltd_1.JPG" rel="enlargeimage" rev="targetdiv:loadarea,link:upload_img/FENDER_STRATOCASTER_66_firemist_silver_Custom_shop_ltd_1.JPG, target="_blank" onclick="" trigger:mouseover" title="">
    Has trailing garbage, it should be:

    Code:
    <a href="upload_img/FENDER_STRATOCASTER_66_firemist_silver_Custom_shop_ltd_1.JPG" rel="enlargeimage" rev="targetdiv:loadarea,link:upload_img/FENDER_STRATOCASTER_66_firemist_silver_Custom_shop_ltd_1.JPG" title="">
    target and onclick aren't valid properties for either version of the script and the default trigger is mouseover, so that's not needed.
    - John
    ________________________

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

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
  •