View Full Version : How to open Lightbox with an image not in the gallery

04-30-2008, 04:03 PM
1) Script Title: Lightbox 2.03

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

3) Describe problem:
Besides clicking on thumbnail images to launch a Lightbox gallery, I'd like to use a graphical button to launch Lightbox. But when I use the rel="lightbox[something]" on the button, it adds 1 to the image count and it's confusing for the user. Advice much appreciated!

Work in progress page here:

04-30-2008, 04:33 PM
I don't know why Lokesh dropped the remove duplicates functionality from v2.04 or if he didn't and you took it out. But, v2.03a has it:


Try using it. It should take care of the problem automatically.

You may have to switch to the entire 2.03a package:


04-30-2008, 04:38 PM
Worked perfectly! Thanks!!!

05-01-2008, 05:50 AM
I don't know if you will get back here or not, but if you do - or if someone else comes across this, you really need to downgrade to the entire 2.03a package, as some browsers will not work well with just the 2.03a lightbox.js running with all of the other 2.04 support files.

And, further - after looking over 2.04 a bit, it looks like it does have a method to prevent duplicates, but it doesn't appear to work, and there are some other bugs or buggish things about it.

So, if 2.04 worked as intended, you probably could have just changed the titles on your image buttons' links to match the others in their sets, and then given the linked image itself a different title, ex:

<a href="images/blinde-1.jpg" rel="lightbox[blinde]" title="Blinde"><img title="Launch Blinde gallery" src="images/btn_gallery.gif" alt="Launch Blinde gallery" width="92" height="92" border="0" /></a>

But it doesn't appear to work, so for now I think I will advise people interested in this feature to downgrade to the full 2.03a package.