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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

javascript not working in page

Go to End

6 Posts   1657 Views


Community Member, 97 Posts

21 January 2010 at 11:27am

Edited: 21/01/2010 11:28am

I am trying to add RevealingPhotoSlide in my page,I have 2 js file and one css file and few images,i have saved the css file under themes/template/blackcandy/css and images under themes/template/blackcandy/images ,I need to include the js file in my page and html code in my page,this is how i am doing it.
i have added the below code in my page.php file

public function init() {


// my added line
//adding ended here

in just under the layour div i have added the below lines
<div id="page-wrap">

<h1>Revealing Photo Slider</h1>


<td><div class="photo_slider">
<img src="http://localhost/cs_login/themes/blackcandy/images/mthood.jpg"/>
<div class="info_area"> </div>

<td><div class="photo_slider">
<img src="http://localhost/cs_login/themes/blackcandy/images/baloon.jpg"/>
<div class="info_area"> </div>

<td><div class="photo_slider">
<img src="http://localhost/cs_login/themes/blackcandy/images/lighthouse.jpg"/>
<div class="info_area"> </div>

<td><div class="photo_slider"> <img src="http://localhost/cs_login/themes/blackcandy/images/giraffe.jpg"/>
<div class="info_area"> </div>


What i am getting is four images in my page without any button for the script i use to get a picture to click so that the image gets bigger.
I have attached the file hwere the script is working fine in simple html.
Hoping that someone will let me know the error and ways to make this working
thank you in advance


Community Member, 89 Posts

21 January 2010 at 5:32pm

The code looks good. Make sure your jquery is not clashing with ss jquery which is for example included with SS navigation bar. Do you have firebug installed? Is it reporting any errors in the console? Is the jquery.js and the photorevealer.js got loaded correctly.

Note: if you have Chrome, it has a debugger built in, you can start it via Viev>Developer>Developer Tools. You can also use IEDeveloperToolbar on IE8, although this is a beast :)


Community Member, 347 Posts

21 January 2010 at 6:38pm

try to add the javascript line in


Community Member, 97 Posts

24 January 2010 at 8:23am

i have tried all the steps but no error and even writting in does not works


Community Member, 541 Posts

24 January 2010 at 9:20am

Well if you're getting a Blank Page with no HTML at all you're either calling a bad control or you have a typo somewhere. When you dev/build does it finish?


Community Member, 97 Posts

26 January 2010 at 8:04am

except the javascript part the rest of the page is working fine..
the images are showing up in the page but the javascript is not working