View Full Version : Conveyor Belt slideshow script help

06-16-2008, 10:35 AM
1) Script Title: Conveyor Belt Slideshow

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

3) Describe problem:

I have the script working and everything is fine but when the pics have done a complete cycle they don't continuously scroll, the last two images seem to disappear then there is quite a large gap before the 1st image scrolls again.
Here is my snippet of code, i'm not sure whether I've done anything wrong, help would be appreciated:

var sliderwidth="571px"
//Specify the slider's height
var sliderheight="300px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="javascript:void(0);"><img src="images/spring2007.jpg"></a>'
leftrightslide[1]='<a href="javascript:void(0);"><img src="images/summer2007.jpg"></a>'
leftrightslide[2]='<a href="javascript:void(0);"><img src="images/autumn2007.jpg"></a>'
leftrightslide[3]='<a href="javascript:void(0);"><img src="images/winter2007.jpg"></a>'
leftrightslide[4]='<a href="javascript:void(0);"><img src="images/spring2008.jpg"></a>'

//Specify gap between each image (use HTML):
var imagegap=" "

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5

06-16-2008, 03:02 PM
The code in your post looks OK, but I may be missing something. If the image train isn't wide enough to fill the 571 pixel width you have set for it, that could be a problem, but I don't think that's happening here. Also, javascript:void(0) is a bad idea, if you want no link, use only the image tag in the array, ex:

leftrightslide[0]='<img src="images/spring2007.jpg">'

Or, if you want a link that's truly inactive (javascript:void(0); will fire in some browsers causing a window.unload event that can curtail some of the functionality of your page), add an onclick event that returns false:

leftrightslide[0]='<a href="javascript:void(0);" onclick="return false;"><img src="images/spring2007.jpg"></a>'

But, again, this wouldn't cause the problem you mention, and is, though important, rather a fine point. It's probably due to other layout and/or style used on the page. To be more specific, I would need to see the live page:

Please post a link to the page on your site that contains the problematic code so we can check it out.