PDA

View Full Version : Only working on some pages



rresidori
05-11-2010, 03:23 AM
1) Script Title: Ultimate Fade In Slideshow

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: I created the slidshow on a template in DW and it works in template form. My other pages are built off of these but it mysteriously only works on two of the pages. The strange this is that on the two pages where it does seem to be working, I have a Flash based picture viewer that also has JS files attached. Could this be what's somehow helping it to work?
Right now, I have it on a test server; here is the address:
http://chicagostrivingreaders.org/rresidori/public_html/rresidori/index.html
Thanks!

jscheuer1
05-11-2010, 05:02 AM
This:


imagearray: [
["sort1.JPG", "", "", ""],
["sort2.JPG", "", "", ""],
["sort3.JPG"],
[""] //<--no trailing comma after very last image element!
],


Should be:


imagearray: [
["sort1.JPG", "", "", ""],
["sort2.JPG", "", "", ""],
["sort3.JPG"] //<--no trailing comma after very last image element!
],


But that's not the main problem. On the pages where it works, the images are where the code indicates that they are. On the pages where where it doesn't work, they are not.

rresidori
05-11-2010, 12:45 PM
Thanks for the response. Yes, I need to add another image right now but for the second part of your response - are you saying that the path to the images is wrong?
I have it in the site root folder (not in a separate folder). Site - sort1.JPG, sort2.JPG, etc. My template path to these in the code is simply: "sort1.JPG." Is this incorrect?
It seems to work on the pages within the Picture albums (March, Random; under the pictures page). Why would it be working here and not the other pages?
Thanks!

jscheuer1
05-11-2010, 03:09 PM
Yes, the paths are incorrect. But I was wrong about the exact reason. Your fadeslideshow.js file has been altered. In several key places its internal paths appear as (for example):


layerHTML+='<img src="../'+imgelement[0]+'" style="border-width:0;" />\n'


That part is not there in the original script and it is forcing it to look in the parent folder of the page. On those pages where the images are in the parent folder, they show up. On those pages where they are not, they do not.

Replace your copy of fadeslideshow.js with a fresh one from the demo page.

rresidori
05-11-2010, 03:52 PM
Dude - You rule!! Thanks! I'm gonna check it out!