Click here to Skip to main content
12,547,439 members (61,855 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET Javascript
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:

    Lightbox (contains all lightbox js, css, and images with no sub-folders)
        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 22-Apr-11 3:42am
Updated 23-Apr-11 0:31am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161018.1 | Last Updated 23 Apr 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100