Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Lightbox PLEASE HELP

Options
  • 24-04-2008 1:24pm
    #1
    Closed Accounts Posts: 11


    I have used lightbox code on my site and it works perfectly when I test it from Dreamweaver but when I FTP it to my site it doesn't work - the image just opens in another window.
    Anyone have any idea what the problem might be?

    Thanks in advance!


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Code?


  • Closed Accounts Posts: 11 Rant


    Here's the code I have in the page
    <script type="text/javascript" src="../lightbox/js/prototype.js"></script>
    <script type="text/javascript" src="../lightbox/js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="../lightbox/js/lightbox.js"></script>
    <link rel="stylesheet" href="../lightbox/css/lightbox.css" type="text/css" media="screen" />and I have all the images and file paths correct, it works perfectly but when I put online it doesn't work. I can't figure it out


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    You sure the paths to the javascript files are correct?

    Could you post a link to the online version?


  • Closed Accounts Posts: 25 pres


    try the js files without the ../


  • Closed Accounts Posts: 11 Rant


    http://www.theitalianlife.com/development/progress.html is the online page where lightbox doesn't work Attached to this post is the text file of the same page on my harddrive where the lightbox does work.
    All the files were uploaded on to the site correctly as far as I can see so all file paths should be the same online and offline.


  • Advertisement
  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    Your javascript files aren't where they're supposed to be.


  • Closed Accounts Posts: 11 Rant


    Where should they be? Surely if it works offline it should work online no?


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    The Lightbox will only work if your webpage can find the Lightbox javascript files.

    This code tells the page where to look for those files :
    <script type="text/javascript" src="../lightbox/js/prototype.js"></script>
    <script type="text/javascript" src="../lightbox/js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="../lightbox/js/lightbox.js"></script>
    <link rel="stylesheet" href="../lightbox/css/lightbox.css" type="text/css" media="screen" />
    

    So your webpage at http://www.theitalianlife.com/development/progress.html is looking for http://www.theitalianlife.com/lightbox/js/prototype.js ....which doesn't exist.


  • Closed Accounts Posts: 11 Rant


    Having the ../ in front of the path makes sense when I look at the web directory - and would that explain why it works from Dreamweaver and not online...?


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    ../ is the same as saying "up one directory".

    so ../ from theitalianlife.com/development/ is theitalianlife.com/

    so in order for theitalianlife.com/development/progress.html to find "../lightbox/js/lightbox.js", you'll need to put lightbox.js in theitalianlife.com/lightbox/js/


  • Advertisement
  • Closed Accounts Posts: 11 Rant


    That is where it is....I have the Lightbox folder of CSS and JS in the main The Italian Life Directory...I'm confused :-(


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    ah, I see what's wrong... Your web server is obviously case-sensitive, while your own machine isn't.

    The folder is actually called Lightbox, not lightbox.

    Either change the 'L' in the folder name to lower-case, or change the links from ../lightbox/js/ to ../Lightbox/js/

    And be careful not to make similar mistakes in future. Referencing files and folders should always be case sensitive. Only Windows lets you away with this... your web server wont.


  • Closed Accounts Posts: 11 Rant


    Really???? (I'm on a Mac btw but I'm sure it's the same) If that's the case thank the lord that it's solved...but also it's a bit over sensitive really!
    Thanks for the help, I'll have to wait till this evening to try and fix it but fingers crossed!!!


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    I'm fully confident it will work :)

    404 Not Found --> http://www.theitalianlife.com/lightbox/js/prototype.js
    The file you need --> http://www.theitalianlife.com/Lightbox/js/prototype.js

    Personally I like case sensitivity.. it's always just made sense to me; don't know why. Sort of the same way that I like the 24-hour clock. I thought Macs had case sensitivity by default though... obviously not.


  • Closed Accounts Posts: 11 Rant


    It worked! Thanks so much will definately not forget about case senstiviy in future.


Advertisement