PDA

View Full Version : Lightbox 2.03a breaks when changing directory structure



bradymc
04-08-2008, 04:32 PM
1) Script Title:
Lightbox image viewer 2.03a

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

3) Describe problem:
The script works fine when maintaining directory structure. But when I move the HTML file to a different folder and update the links for the JS and CSS, the loading image and close image no longer work. I didn't change their paths in the JS or CSS and I know it's finding the JS and CSS files because it's styling the lightbox and animating as it should. If it can find the JS file, why can't it find the images?

bradymc
04-08-2008, 06:44 PM
Being an impatient AND persistent person, I kept looking around. After visiting the original author's website (and finding a newer version available as well), I discovered in his support forum one phrase that fixed it all.

"Note that the path to the .gif-files is relative to the folder where the webpage has been placed from which you call the javascript, not relative to the folder where the javascript itself has been placed."

Really? Is that true of all JS files that call images???

Path amended. Problem solved.