Advanced Search

Results 1 to 2 of 2

Thread: Lightbox 2.03a breaks when changing directory structure

  1. #1
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Question Lightbox 2.03a breaks when changing directory structure

    1) Script Title:
    Lightbox image viewer 2.03a

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/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?

  2. #2
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •