View Full Version : Jump To New Page After Last Image Of Slideshow Has Played

10-07-2009, 01:32 AM
1) Script Title: Ultimate Fade-in slideshow

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

3) Describe problem: When the last image is done I would like to automatically jump to a different page. The reason for this is that it is a 4 image slideshow for a home page which should automatically play the slides and then I want to have the code automatically jump to the main part of the site.

If this script can't do it, is there another slideshow that could?

10-07-2009, 07:05 AM
You may use the script's undocumented onslide property for this, ex (added to the configuration for the first gallery from the demo page's example code, be sure not to miss the added comma after togglerid: ""):

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [468, 500], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
displaymode: {type:'auto', pause:2500, cycles:4, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: "",
onslide: function(){if(this.setting.currentstep === this.setting.totalsteps - 1)
this.showslide = function(){window.location.href = 'http://www.google.com/';};

You may change http://www.google.com/ to a URL of your choosing, it can even be just a page (somepage.htm) if it is in the same folder on the same domain as the page with the slide show on it, or just a path and page if on the same domain, but in a different folder.