Advanced Search

Results 1 to 2 of 2

Thread: Conveyor Belt slideshow script help

  1. #1
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Conveyor Belt slideshow script help

    1) Script Title: Conveyor Belt Slideshow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rightslide.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:

    Code:
    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:
    slidebgcolor="#ffffff"
    
    //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
    Last edited by jscheuer1; 06-16-2008 at 03:02 PM. Reason: format code

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,639
    Thanks
    42
    Thanked 2,896 Times in 2,868 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    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:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •