Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Elvia 4 posts 24 karma points
    Oct 14, 2011 @ 16:31
    Elvia
    0

    Javascript Image Swap

    I have an image swap that calls a Javascript file and has some javascript on the page. I tried uploading the the include file through media then linking to in the header but that doesn't seem to work. Can someone point me in the right direction of getting this to work? The image swap is just for one given page on the site. 

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Oct 14, 2011 @ 16:49
    Michael Latouche
    1

    Hi Elvia,

    Javascript files should be created in the Settingssection, under "scripts". You can then refer to them in your header using /scripts/myFile.js links.

    Hope this helps.

    Cheers,

    Michael.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 14, 2011 @ 18:25
    Jan Skovgaard
    1

    Hi Elvia

    I'd just like to add that if you have FTP access to the site or some kind of other access to the disk on the server you can just copy your script into the scripts directory and then make sure your're referencing your script in the correct template.

    But if you don't have this kind of access Michael is spot on :)

    /Jan

  • Elvia 4 posts 24 karma points
    Oct 14, 2011 @ 18:32
    Elvia
    0

    Thanks you both for your responses. I managed to link it fine doing it Michaels way. I'm still working local, trying to figure the system out.

    I pull up the source code and everything is there but there is no effect. 

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Oct 15, 2011 @ 00:20
    Michael Latouche
    0

    Hi Elvia,

    What do you mean by "there is no effect"? Is it still not working? Can you maybe then post some code, this might help in identifying the problem.

    Cheers,

    Michael.

Please Sign in or register to post replies

Write your reply to:

Draft