ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

I can never get my javascript to load without great pain.

March 25, 2012 10:01pm

Subscribe [3]
  • #1 / Mar 25, 2012 10:01pm

    Stefani Ann

    35 posts

    This question may be related to a resolved thread.

    I am creating a different site and have a similar problem. The last time it fixed itself by apparent magic, one day not working the next day working. The second site, only worked when i out the actual javascript into the template right near the div (ie linking to the external js file in footer as recommend didn’t work for me), and now on this site nothing is working and I am out of magic!

    I have linked to the http://www.mysite.com/js/javascript version in my footer, embed the actual script in the template , but my javascript wont load. UI have loaded the site and looked in console, the js file is being found, there are no errors in the console, no erros in debugging, but the slider just doesn’t do anything.

    Its really weird because I had the whole site working fine when it was in html, but since putting it into Expression Engine it doesn’t work anymore.
    What am I doing wrong?

     

  • #2 / Mar 26, 2012 2:04pm

    Andrew Fairlie

    126 posts

    Hi Stefani,

    First of all - a quick unrelated pro-tip. ExpressionEngine’s install consists of the following folders:

    /system
    /themes
    /images

    If you make a folder called /build/ with your own folders and templates in (and with 2.5 your third-party folders) it’ll make upgrading your website that little bit easier.

    On to the actual question…
    Could you show us the site, and the template? Are you sure it’s meant to go in the footer - that seems a little odd. Try moving it to the header and see if it works better.

  • #3 / Mar 26, 2012 6:08pm

    Sean C. Smith

    3818 posts

    Hi Stefani,

    I’m sorry that you are having this trouble with getting your javascript file to work with your templates. As Andrew suggested it would be very helpful if you could post up your template code here as well as the folder structure you have on the server. You can paste your code here using [ code][ /code] tags or use a pastie.

    Looking forward to your response.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases