SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with multiple javascripts?

    I'm currently working on building a site as part of an external University project. I have basic knowledge of coding and have got to a point where I'm a little out of my depth. The page that I am having trouble with is the home page as I want to run a javascript twitter feed and a slideshow on the same page. I have never used javascript before and have tried to follow tutorials and other forum posts, but I don't really know what I'm doing and it is taking up to much of my time trying to work out what I'm doing wrong.

    I have placed the files for sharing with this link; as I am unsure how to do it here: https://www.dropbox.com/sh/zl5qonxri3scflj/SVRseVEDKT

    Any help with this would really help me out a lot.

    Thank you

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by meganj15 View Post
    Any help with this would really help me out a lot.
    Currently when I load your page, I'm getting errors about the following files failing to load:
    • css/slideshow.css
    • js/jquery.cycle.js
    • js/slideshow.js
    • images/bird.png
    • loader.gif
    Last edited by paul_wilkins; Sep 11, 2012 at 15:19. Reason: s/birg/bird
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Currently when I load your page, I'm getting errors about the following files failing to load:
    • css/slideshow.css
    • js/jquery.cycle.js
    • js/slideshow.js
    • images/bird.png
    • loader.gif

    I have tried search for image/birg.png and can't find where that is in the code, but it should be images/bird.png. I have added the slideshow.css to a new css folder; but I am unsure what loader.gif is, as I have searched my computer and can't find it anywhere.

    I am unsure why the files won't load, but they are all place in the correct paths that you have said,
    Last edited by paul_wilkins; Sep 11, 2012 at 15:19. Reason: propagate spelling correction to quote

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by meganj15 View Post
    I have tried search for image/birg.png and can't find where that is in the code, but it should be images/bird.png. I have added the slideshow.css to a new css folder; but I am unsure what loader.gif is, as I have searched my computer and can't find it anywhere.

    I am unsure why the files won't load, but they are all place in the correct paths that you have said,
    There wasn't a slideshow.css file in the zip that I unpacked.

    For jquery.cycle.js and slideshow.js, those are due to the pathing on the filenames

    HTML Code:
    <script type="text/javascript" src="../../../Desktop/stf_root/js/jquery.cycle.js"></script>
    <script type="text/javascript" src="../../../Desktop/stf_root/js/slideshow.js"></script>
    If they're relative to the html file being loaded, you really should just use instead "js/jquery.cycle.js"

    The same problem occurs in the CSS file too, with:

    Code css:
    #bird {background-image:url(../stf_root/images/bird.png); background-repeat:no-repeat; width: 49px;
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    There wasn't a slideshow.css file in the zip that I unpacked.

    For jquery.cycle.js and slideshow.js, those are due to the pathing on the filenames

    HTML Code:
    <script type="text/javascript" src="../../../Desktop/stf_root/js/jquery.cycle.js"></script>
    <script type="text/javascript" src="../../../Desktop/stf_root/js/slideshow.js"></script>
    If they're relative to the html file being loaded, you really should just use instead "js/jquery.cycle.js"

    The same problem occurs in the CSS file too, with:

    Code css:
    #bird {background-image:url(../stf_root/images/bird.png); background-repeat:no-repeat; width: 49px;

    I have fixed what you said, but I can't seem to get the files to upload to here in a zip, but all the files are in the link that I posted earlier.

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by meganj15 View Post
    I have fixed what you said, but I can't seem to get the files to upload to here in a zip, but all the files are in the link that I posted earlier.
    I still don't see the slideshow.css file in your zip file. Where did you get the slideshow from?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Tags for this Thread

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
  •