View Full Version : Ultimate slideshow - Run Once onLoad, Click to Run Again

09-21-2006, 11:32 AM
1) Script Title: Ultimate slideshow - Run Once onLoad, Click to Run Again

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

3) Describe problem: Hi there, Snax the noob here. I have incorporated the Ultimate fade-in slideshow to the banner on my website (sweet script btw), and used jscheuer1's modification (http://www.dynamicdrive.com/forums/showthread.php?t=9148) to cycle through the image slideshow only when the banner is clicked.

I am now trying to have the slideshow run once onLoad of the page or when it is refreshed, then run again if clicked as already achieved thx to jscheuer1.

I have done my best searching the Forums and had a go at modifying the code (changing 0's to 1's and vice versa) but got nowhere. As you can tell, I have very little Javascript knowledge, but can usually find thet solution I am looking for with a quick Google search.

I appreciate your time and look forward to some constructive responses.


PS - I ran into problems pasting my code here b/c went over the alotted images limit. The only modifications I did to jscheuer1's code was with the array declaration(s) for the banner images.

09-21-2006, 09:29 PM
I remember that one, it was a tough one to work out but, easy to get it to do what you want, find the this.flag value here:

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay){
var tempimage=theimages[0]
for (var i_tem = 0; i_tem < theimages.length-1; i_tem++)
this.degree=10 //initial opacity degree (10%)

Change it to 0.

09-21-2006, 10:45 PM
Perfect thanks John, that worked a treat. I tried that but it stalled on the second image so I figured it wasn't the solution. Works now so sweet as.

Thanks again.