View Full Version : Ultimate Fade In Slideshow v2.0 Error Message

02-05-2013, 08:53 PM
1) Script Title: Ultimate Fade In Slideshow v2.0

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

3) Describe problem:

Hello. I installed the Ultimate Fade-in slideshow in the index page of the website and it works perfectly. However, I added the script in the header.php include file, that appears in in several pages of the website, including the index page where the slideshow is. When I navigate to the other pages, I get this message: "Error: DIV with ID "fadeshow1" not found on page." I went ahead and removed the slideshow script form the header.php as well as removed the php header from my index page. I still would like to use the header.php with the slideshow scrip in the index page but how can I stop the error message from showing on the other pages? I'm new, please be kind. Thanks :)

02-06-2013, 12:52 AM
The best thing to do is to only include the script on the page that's using it. If that's impossible, you can edit the script. Using a text only editor like NotePad, find this portion of it and add the red comment tokens as shown:

jQuery(document).ready(function($){ //fire on DOM ready
var setting=slideshow.setting
var fullhtml=fadeSlideShow.routines.getFullHTML(setting.imagearray) //get full HTML of entire slideshow
setting.$wrapperdiv=$('#'+setting.wrapperid).css({position:'relative', visibility:'visible', background:'black', overflow:'hidden', width:setting.dimensions[0], height:setting.dimensions[1]}).empty() //main slideshow DIV
if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
//alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
setting.$galleryl . . .

Save that version and use it.