Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Add JavaScript file to Silverstripe for Image Scrolling


Go to End


2 Posts   3810 Views

Avatar
Singh

Community Member, 9 Posts

21 November 2008 at 10:36am

Hi Everyone,

I am trying to add a javascript file to silverstripe. I am using a program which creates this javscript file and also give me this HTML code
<script src="Slide.js" type="text/javascript"></script><script>SlideSetFolder('');</script>
to add to the Page where i want to use the image. Basically what this piece of code along with javascript will do is that it will display an image on a webpage, and then keep scrolling with fading effects.
It works fine if I just create a webpage, and the javascript file is on the same path.
Now where should I put this javascript on my FTP directory.

Please help.

Avatar
Liam

Community Member, 470 Posts

21 November 2008 at 12:03pm

Probably best in your mysite/javascript folder. Then just change the path to it when you call it in your template.