Results 1 to 9 of 9

Thread: Lightbox image viewer - Not working at all

  1. #1
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Lightbox image viewer - Not working at all

    Lightbox image viewer

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

    I did step one, added the required code in the "HEAD" portion of my .html file.

    Step 1.
    HTML Code:
    <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="lightbox.js"></script>
    I created my "thumbnail" HTML code as instructed by step 2.
    Step 2.
    HTML Code:
    <td height="159" width="100"><a href="images/3d_media/DIEGOHeartofDarkness_front_closeup.JPG" rel="lightbox" title="Heart of Darkness - Close Up"><img src="images/3d_media/DIEGOHeartofDarkness_front_closeup_s.jpg" /></a></td>
    Step 3.
    I downloaded the lightbox.zip file , unzipped the file and uploaded the contents of the zip file to the root folder of my site.
    Needless to say, it's not working. What am I missing?

    Any help is greatly appreciated.
    Last edited by Snookerman; 05-01-2009 at 03:38 PM. Reason: added [html] tags and “Resolved” prefix

  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

    Looks like there might be disagreement in upper and lower case for the larger image filename, but it could be that and, or just something else.

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

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

  3. #3
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I tested the script on a blank .html page and it worked. my guess is that there is code on the page stopping it from working.

    this is the page that contains the script.
    http://www.rudyfernandezstudio.com/d...arkness-1.html

  4. #4
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    forgot to mention... the script is only being used on the 4 small images around the main image.

  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

    That's a simple onload conflict, change your body tag to include initLightbox() in the onload event:

    Code:
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="initLightbox();MM_preloadImages('images/3d_mixR.gif','images/oil_paintingsR.gif','images/print_mediaR.gif','images/exibitsR.gif','images/workshopR.gif','images/special_projectsR.gif','images/biographyR.gif','images/contact_meR.gif','images/related_linksR.gif','images/review_essaysR.gif')">
    - John
    ________________________

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

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    joesmoe (03-12-2009)

  7. #6
    Join Date
    Mar 2009
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you! That did it!

  8. #7
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I can't get this script to work either, not sure what I'm doing wrong. I tried the suggestions in the thread but still nothing. Do you think the problem is that I am trying to use it with Joomla? This is the page I am trying to get it to work on:

    http://www.kilowattstudio.com/joomla...d=36&Itemid=53

    I have only tried using it on the first thumbnail, the bottom two it should not be working on.

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

    Your script tag for lightbox.js points to nothing:

    Code:
    <script type="text/javascript" src="/joomla/./lightbox/lightbox.js"></script>
    That /. is meaningless, and though it does no harm, you should use (for clarity):

    Code:
    <script type="text/javascript" src="/joomla/lightbox/lightbox.js"></script>
    But it's still not there, however you write it:

    http://www.kilowattstudio.com/joomla...ox/lightbox.js

    Upload the script to that location on the server. There could also be other problems.
    - John
    ________________________

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

  10. #9
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Aha! Works great now, thank you!

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
  •