PDA

View Full Version : Error: DIV with ID "fadeshow4" not found on page.



ehswift71
03-28-2017, 09:01 PM
1. Title: Ultimate Fade-in slideshow (v2.6.1)
2. DD URL: http://dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

I have recently installed this slideshow on my homepage and it seems to work fine. However I also wish to hide it from every other page of the site. Here is the code I am using to hide the slideshow elsewhere.

<?php if ($this_is_home_page) { ?>
<div id="fadeshow4"></div>
<?php } ?>

When I go to any page other than the homepage I get this error: Error: DIV with ID "fadeshow4" not found on page.

======================================================================================

I believe this is the javascript code that needs to be changed, commented out or removed, but I am not sure how to do that so the script quits checking for errors.

Here is that code. Your help with this is greatly appreciated.

]
if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
return
}

jscheuer1
03-29-2017, 02:31 AM
That code is for situations where the script IS NOT put on every page regardless of whether or not it's used on them. If you cannot correct that, you can comment out the alert (add highlighted using a text only editor like NotePad):


if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
// alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
return
}

styxlawyer
03-29-2017, 06:10 PM
The best way to avoid that error message is remove the instantiation of the slideshow in the <head>...</head> section of your page. This will be very easy to implement in PHP.