Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Jquery slider works on laptop, doesn't work when uploaded

    Hi, I've got a gorgeous slider on my site which works fine on my laptop when viewed in the browser, however when I upload everything (including all the files the script points to) it doesn't work. Does anyone know why that would be?

    Code:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Night and Day PA - Outsourcing your to-do list</title>
    <link href="style/style.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="style/orbit-1.2.3/orbit-1.2.3.css">
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
    <script src="style/orbit-1.2.3/jquery.orbit-1.2.3.js" type="text/javascript"></script>
    <script type="text/javascript">
         $(window).load(function() {
             $('#featured4').orbit();
         });
            </script>
    </head>
    
    <body>
    <div id="header"> 
    	<div class="logo"></div>
    </div>
    
    <div class="clear"></div>
    
    <div id="nav">
    	<ul>
        	<li><a href="index.html">Home</a></li>
        	<li><a href="services.html">Services</a></li>
            <li><a href="about.html">About Us</a></li>
            <li><a href="contact.html">Contact Us</a></li>
            <li><a href="team.html">Meet the Team</a>
            <ul>
            	<li><a href="daytime.html">Daytime Team</a></li>
                <li><a href="ooh.html">Out of Hours Team</a></li></ul>
          </li>
        </ul>
    </div><!--nav close-->
    
    <div class="clear"></div>
    <div id="divider"></div>
    
            <div id="featured4"> 
              <img src="images/slides/switchboard.gif" alt="01">
              <img src="images/slides/diary.gif" alt="02">
              <img src="images/slides/24hr.gif" alt="03">
    		  <img src="images/slides/escalation.gif" alt="04">
              <img src="images/slides/ticket.gif" alt="05">
              <img src="images/slides/translation.gif" alt="06">
              <img src="images/slides/holiday.gif" alt="07">
     		  <img src="images/slides/email.gif" alt="08">
    
            <p>&nbsp;</p>
            <p>&nbsp;</p>
    </div>
          <div id="divider"></div>
    <div id="footer">
    	<div class="content_left">&copy; Night and Day PA</div><div class="content_right">01482 66 11 60</div>
    
        <div class="logos">
        	<ul>
            	<li><a href="https://www.facebook.com/pages/Night-and-Day-PA-Limited/246418822184585" title="facebook icon" target="_new" class="foot_facebook"></a></li>
                <li><a href="https://twitter.com/NightAndDayPA" title="twitter icon" target="_new" class="foot_twitter"></a></li>
                <li><a href="https://twitter.com/NightAndDayPA" title="linkedin icon" target="_new" class="foot_linkedin"></a></li>
            </ul>
        </div>
                </div>        
        
        
    </body>
    </html>
    Any help would be greatly appreciated, thanks

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    That sounds like the typical “wrong file paths” issue. Can you show us a link of the online example? What is the directory structure there?

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts
    It's hidden behind a website I currently host as I haven't sorted hosting yet

    You can see it at youthenterprise.co.uk/nd/index.html

    Thanks for your help I just really don't understand how it works on my laptop but when I upload the entire folder it is all stored in it suddenly doesn't work! Coding is so hard sometimes

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    There we go, I suspected correctly. The browser looks for the JS file at http://youthenterprise.co.uk/nd/style/orbit-1.2.3/jquery.orbit-1.2.3.js but it isn’t there (interestingly it gives a 403 error when accessing http://youthenterprise.co.uk/nd/style/ doesn’t – you really should disable directory listing, though!). Apparently you haven’t uploaded the JS or uploaded it to another directory?

  • #5
    New Coder
    Join Date
    Jul 2012
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts
    As far as I know it points at the jquery on it's own site - using a <script> link http://code.jquery.com/jquery-1.7.2.js. I figured out about a week ago that's why it didn't work when I wasn't connected to the internet

    I've checked on the FTP - the whole orbit file is there, including the js file, but for some reason the page isn't reading it when viewed from the server?

    The directory goes style/orbit-1.2.3/ then there's all the code files - jquery-1.5.1.min.js, jquery-orbit-1.2.3.js and jquery-orbit-1.2.3.min.js, for some reason that directory doesn't show in the listing, but is on FTP file listing

  • #6
    New Coder
    Join Date
    Jul 2012
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I don't know if this helps... when I view the source of the page, the jquery code is not coloured the way all the other hyperlinks and such are. Is it a problem with the jquery file not uploading correctly?

  • #7
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    Well, the server returns this message when trying to access the file via HTTP:
    Forbidden

    You don't have permission to access /nd/style/orbit-1.2.3/jquery.orbit-1.2.3.js on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    “Forbidden” or “you don’t have permission” is verbose for a status 403 which means that there is an issue with the file permissions (read/write/execute) so I suggest you check and adjust the file permissions with your FTP program. Assuming you’re on an Apace server (which is usually the case) the file permissions for directories should be 755 and permissions for files are 644. I suppose the permissions are set somehow so that “everyone” doesn’t even have read permissions so that we can’t even see the directory via HTTP.

  • Users who have thanked VIPStephan for this post:

    NicolaHWS (02-09-2014)

  • #8
    New Coder
    Join Date
    Jul 2012
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks for all your help, I'll get my partner to look at the permissions, that's not something I have access to through my little Cyberduck software, I think he will server side though I'll let you know how I get on

  • #9
    New Coder
    Join Date
    Jul 2012
    Posts
    26
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Aaaand it works! Thank you so much for all your help

  • #10
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    You should be able to change permissions with Cyberduck, too. I’m not using it but I suppose it works as in any FTP program: You bring up the context menu for a file (i. e. right click and select “file info” or whatever it reads) and it should show permissions which you can change (if the administrator has given your FTP account the permission to change permissions ).


  •  

    Posting Permissions

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