PDA

View Full Version : Ultimate Fade In Problem 1.5



terryd
06-16-2006, 01:14 PM
I was wanting to implement the script on 2 different places on the same page but I can't get it to work. It works fine when I call the script once wintonapshow.co.nz (http://wintonapshow.co.nz) but when I try to get it to show in another place with different images the second lot of photos don't show and the page sometimes comes up with errors.http://www.wintonapshow.co.nz/About-The-Show.html
If I put 2 instances of the first array of photos on the webpage it works perfectly but when I try to add the second it just comes up with no photos or anything and yet I'm sure all paths are correct.

Thanks
Terry

jscheuer1
06-17-2006, 04:27 AM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which among other things, state that the script credit must appear in the source code of the HTML page(s) using the script. Please reinstate the notice first.

To remedy the above, change this:


<script src="images.js" type="text/javascript"></script>

to:


<script src="images.js" type="text/javascript">
/***********************************************
* Ultimate Fade-In Slideshow (v1.5): Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>

Your problem is simple. you left out the #2 entry in the second array, change this:


var fadeimages2=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["images/photo1.jpg", "", ""]
fadeimages2[1]=["images/about2.jpg", "", ""] //<-- Where's [2]?
fadeimages2[3]=["images/about3.jpg", "", ""]
fadeimages2[4]=["images/about4.jpg", "", ""]
fadeimages2[5]=["images/about5.jpg", "", ""]

to:


var fadeimages2=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["images/photo1.jpg", "", ""]
fadeimages2[1]=["images/about2.jpg", "", ""]
fadeimages2[2]=["images/about3.jpg", "", ""]
fadeimages2[3]=["images/about4.jpg", "", ""]
fadeimages2[4]=["images/about5.jpg", "", ""]

terryd
06-18-2006, 01:27 AM
Wow,

Thanks for that John, you wouldn't believe how long I stared :eek: at that code wondering why in hell it wouldn't work!

I'll put the credits in the proper place as well, I had left it on the external js sheet as I thought that was alright.

Much appreciated,

Terry