PDA

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



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

http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm

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.

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

joesmoe
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.
http://www.rudyfernandezstudio.com/diego_darkness-1.html

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

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

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

lisan28
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:

http://www.kilowattstudio.com/joomla/index.php?option=com_content&view=category&layout=blog&id=36&Itemid=53

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

jscheuer1
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:

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

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

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