Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using FireFox 4.0:

I was playing around with Lightbox2 last night, and I simply can't get it to load the control images (like loading.gif or closelabel.gif), even if they're in the same folder as the javascript. The applicable part of my site hierarchy looks like this:

root
    Lightbox (contains all lightbox js, css, and images with no sub-folders)
    MySubFolder
        masterpage.master (loads the lightbox js)
        Default.apsx (contains images that are be lightboxed)


The lightbox styles and javascript are loaded, and the image comes up as expected, but the frame around the image doesn't have the close image (closelabel.gif) on it. If I hover the mouse in just the right place on the frame, I can click the invisible image, and the window returns to the normal pre-lightboxed view. I played around with it for about two hours yesterday, but could not get the image to show up.

This issue caused me to look for an alternative to Lightbox2. I think I want to try ShadowBox next, but I'm wondering if anyone else has:

0) had the same problem with Lightbox2

1) found anything that's better (and lighter weight)

2) experience with ShadowBox

3) any idea why Lightbox2 refuses to show the window control images

I started with Lightbox2 because it appears to work fine on their demo page with IE8 which is what I have to use at work, but when I got home and actually put it into a web page, I had the problems cited above. I don't think it's because I'm using FF4, because if I remember correctly, their demo page worked fine with it.
Posted
Updated 23-Apr-11 0:31am
v2

1 solution

Well, after fighting with lightbox2 some more, I decided to try shadowbox, and it worked as advertised without any changes, so I switched to that.

Once complaint about shadowbox - it appears as if some sort of obfuscation has been applied because all of the variables and method names are either one or two characters long. This makes it pretty much impossible to figure out what the guy did or modify the code to suit your own needs. Of course, there aren't any comments either.

Anyway, if anyone else wants to explore the wonderful world of lightbox technology, here's a link to a page that lists a few dozen different approaches, supporting pretty much any javascript framework you might happen to name:

Lightbox clones[^]

The only thing you really have to do is consult the chart, and pick the lightbox code that best fits your needs. FWIW, Shadowbox allows you to pick the framework and the feature set, thus allowing you to tailor your download and how much overhead and dependency crap you really want to deal with.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900