View Full Version : JS Error with Featured Content Slider

11-29-2011, 06:19 PM
Re: http://www.garagepals.com/work-bench.html with this script: http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

Can anyone spot why featuredcontentslider.init is undefined? I've got this scripting working on a number of sites. Error: 'featuredcontentslider' is undefined

But I sure don't see what's different about the scripting here. Error: 'featuredcontentslider' is undefined.

11-29-2011, 06:37 PM
The script for it (contentslider.js) isn't associated with the page. I did find a script (lib.store.yahoo.net/lib/yhst-65054472207421/et-viewimg.js) that starts out like so:

//** Begin Veiwimg image magnifier popup scripting
//** This script is from Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
//** It is split out here for use on pages without slide shows, but needs to be loaded for Content Slider to work

But as it clearly states, it's only part of it. And I'm not even convinced of that.

Make sure the contentslider.js script and all of its resource files are properly installed on the page.

And, once you do so, make sure that the script credit appears in the served source code of the page.

11-29-2011, 10:03 PM
Thanks John. I sure thought I had copied all the scripting to the files library and called it. Obviously I had not.

Fixing that introduced a new problem though. The referenced URL now shows only one alternate view instead of all 5. The links in the "toc" to the additional thumbnails are getting written with a style="display: none;" added to them apparently by JavaScript. Have I got something squicked in the init settings that would cause this?


11-30-2011, 01:30 AM
Never mind. I found it. There was a scripting error in the code that should have generated the additional content divs for slides 2 and beyond. Without those content divs getting generated into the HTML source, the JavaScript was going nuts.