SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaScript Problems

    Can anyone advise please?

    I have bought some CSS templates and I am uploading for the first time on my server. Everything works fine except the JavaScript files for Lightbox and spry widgets.

    Everything totally works locally.

    I have checked everything as far as I can but cant seem to solve the problem.

    Any solutions?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    Hi glenn9370, welcome to the forums,

    Did you double check the paths and spelling?

    If the js files are in a "sibling" folder on your localhost, they should be similarly located on your live host.

    Some OS ignore case but others don't. So even if
    src="Lightbox.js" is working OK getting the file "lightbox.js"
    on your localhost, you may need to change it to src="lightbox.js"
    if case matters.

    Or maybe the files were corrupted during upload, try uploading them again.

  3. #3
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for replying Mittineague,

    I did look at that at first but I will re-check everything again.



    Thanks again,

    Glenn

  4. #4
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Mittineague,

    I have checked everything as far as I can - paths, correct spelling etc - but cant seem to solve the problem.

    The live link is here if you want to look:

    http://www.glennnorwood.co.uk/Franci...ml/prices.html

    If you need to see what I have locally I have zipped up the site which can be downloaded at:

    http://www.glennnorwood.co.uk/FrancisNeill.zip

    Thanks again,

    Glenn

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)
    I know with the YUI library it makes a difference in what order the files are referenced. eg. you need to load the "base" files before those under them that require them. But both the online and zipped index file specify the same order. One difference I noticed is that the zipped index does not load
    HTML Code:
    <script type="text/javascript" src="js/facebox.js"></script>
    When I looked at facerbox.js it said it requires jquery 1.2+ so mybe your online version requires a jquery greater than 1.2.6?

    But I think the problem is that your online jquery file is corrupt. The Firefox error console shows
    Code:
    Error: missing ) after condition
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/jquery-1.2.6.min.js
    Line: 28
    Source Code:
    xOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSi
    
    Error: jQuery is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/jquery.scrollTo-1.3.3.js
    Line: 299
    
    Error: jQuery is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/jquery.localscroll-1.2.5.js
    Line: 203
    
    Error: jQuery is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/jquery.serialScroll-1.2.1.js
    Line: 379
    
    Error: $ is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/coda-slider.js
    Line: 2
    
    Error: $ is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/styleswitch.js
    Line: 13
    
    Error: jQuery is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/js/facebox.js
    Line: 320
    
    Error: $ is not defined
    Source File: http://www.glennnorwood.co.uk/FrancisNeill/html/prices.html
    Line: 30

  6. #6
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I agree - I think it is corrupt also.

    I shall try again with a later version of facebox & see what happens.

    Thanks for your help - I'll let you know how I get on OK


    Glenn


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
  •