PDA

View Full Version : Ultimate Fade In Slideshow: Multiple Instances



vlastanovak
05-25-2010, 08:31 AM
1) Script Title: Ultimate Fade In Slideshow

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

3) Describe problem: I would like to run two different instances of this script on my website. A large slideshow on the index, and a smaller one on content pages. I am using a header.php file which is called for on every page - both script instances are called for inside my header as instructed on the script installation page.

The problem is, my second smaller slideshow is not on my index page, so when the page loads I get the following error message;

"Error: DIV with ID "fadeshow2" not found on page"

And vice versa on my content pages;

"Error: DIV with ID "fadeshow1" not found on page"

Is there a way to stop this error message from popping up? Maybe I can define the scripts in the individual files as opposed to inside the header? How would I do this?

vwphillips
05-25-2010, 10:43 AM
adding the red code should resolve the problem


function fadeSlideShow(settingarg){
this.setting=settingarg
settingarg=null
var setting=this.setting
if (!document.getElementById(setting.wrapperid)){
return;
}
setting.fadeduration=setting.fadeduration? parseInt(setting.fadeduration) : 500
..........