View Full Version : Resolved Lightbox image viewer - Not working at all

03-10-2009, 05:46 PM
Lightbox image viewer


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

Step 1.

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

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

03-10-2009, 08:29 PM
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.

03-12-2009, 02:44 PM
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.

03-12-2009, 02:51 PM
forgot to mention... the script is only being used on the 4 small images around the main image.

03-12-2009, 03:38 PM
That's a simple onload conflict, change your body tag to include initLightbox() in the onload event:

<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')">

03-12-2009, 08:44 PM
Thank you! That did it!

05-01-2009, 03:12 PM
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:


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

05-01-2009, 03:25 PM
Your script tag for lightbox.js points to nothing:

<script type="text/javascript" src="/joomla/./lightbox/lightbox.js"></script>

That /. is meaningless, and though it does no harm, you should use (for clarity):

<script type="text/javascript" src="/joomla/lightbox/lightbox.js"></script>

But it's still not there, however you write it:


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

05-02-2009, 01:52 AM
Aha! Works great now, thank you!