Click here to Skip to main content
Rate this: bad
good
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:
 
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 22-Apr-11 3:42am
Edited 23-Apr-11 0:31am
v2

1 solution

Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 363
1 OriginalGriff 344
2 George Jonsson 238
3 Shemeemsha RA 148
4 Animesh Datta 130
0 OriginalGriff 6,179
1 Sergey Alexandrovich Kryukov 5,616
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 23 Apr 2011
Copyright © CodeProject, 1999-2014
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