PDA

View Full Version : Lightbox image viewer 2.03a



bethcollett
02-14-2009, 12:12 AM
1) Script Title: Lightbox image viewer 2.03a

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

3) Describe problem:
I followed the step-by-step instructions on installation of this script, including the downloading and uploading of the files to my host. It worked fine at first, but I recoded my site when changing the template, and the script doesn't seem to work now.
When the thumbnails are clicked, viewers are directed to another page with the picture on it, instead of seeing the picture presented in the lightbox as they should.
I'm not sure where I've gone wrong, and I've tried to find the problem several times and found no errors in the coding or in the urls and found no reason why it shouldn't work.
Here are three links to pages of my site which demonstrate the problem I've described.
http://www.bethcollett.webs.com/allfestival.htm
http://www.bethcollett.webs.com/family.htm
http://www.bethcollett.webs.com/heroes.htm
Any suggestions on how to fix this problem?

jscheuer1
02-14-2009, 05:41 PM
You have added a jQuery menu to your page. Lightbox is generally incompatible with the jQuery library. There are approaches to get it to coexist with it, but I haven't found one that works reliably. I would suggest switching to a jQuery Lightbox like:

http://leandrovieira.com/projects/jquery/lightbox/

or:

http://plugins.jquery.com/project/jquerylightbox_bal

bethcollett
02-14-2009, 10:55 PM
I understand why it wasn't working before. Thank you so much. I tried using the jQuery Lightbox found through the first link you suggested, but I wasn't able to get it to work either.
I'm not sure if my coding's correct or not this time. I hate to seem illiterate, but this jQuery stuff is new to me. :rolleyes:
This is the page I tried the new script on:
http://www.bethcollett.webs.com/allfestival.htm

jscheuer1
02-15-2009, 06:43 AM
I'm not sure where to begin, so I'll just jump right in. There can be only one opening html tag on a page. JQuery should only be linked once to the page, before any of the other scripts that use it. It appears that your host has added a script or scripts to the page and that perhaps you copied the live source code with them on there and didn't remove them before updating the code and uploading it again. You are using the jQuery Lightbox 5 files, but are referencing the JQuery Lightbox 4 files in your source code. The Lightbox resource images are not where the script expects to find them. Stylesheets belong in the head of your page.

In addition, the source code is generally sloppy and invalid (don't get too scared about this last bit, it just means that it doesn't follow standards).

I didn't want to take too much time working out every problem, but did get the JQuery Lightbox working locally and also took care of some of the worst problems. Attached is an archive of that file:

2493