View Full Version : Featured Content Slider v2.0 script error

05-09-2008, 04:54 PM
1) Script Title: Featured Content Slider v2.0

2) Script URL (on DD):

3) Describe problem: I am getting a script error when using IE 7 and 6, but Firefox seems to be fine.

(runtime error, line 132, the specified procedure could not be found)

Love the script otherwise
:), its perfect for what we need on our college website.

05-09-2008, 05:00 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Is this happening on the demo page, or just on your page? If it is the demo page, it is probably your browser's settings. If it is just on your page:

Please post a link to the page on your site that contains the problematic code so we can check it out.

05-09-2008, 05:30 PM
Thanks for your quick response, I had to build it in our CMS so it could be accessed externally.

here is the link:

05-09-2008, 06:14 PM
I'm not getting the same error that you are. And I get it in FF as well as in IE (you have to ask FF to report errors, IE does it automatically). You should remove all this (not the one for slider1 - you need that one):

<script type="text/javascript">

id: "slider2", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "markup", //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
enablefade: [true, 0.2], //[true/false, fadedegree]
autorotate: [false, 3000], //[true/false, pausetime]
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)


as it isn't being used. However, your error is coming from this line (+/- 1):

if (targetobject.filters && targetobject.filters[0]){ //IE syntax

This means that IE has 'safe' Active X filters disabled. This is a common setting for IE used over a network. However, if this is on your own computer, and you have a 'stand alone' version of IE 6 with IE 7 as the main IE browser, you may be getting a different error in IE 7 until you remove the extra code I mentioned above (line 47 - document.getElementById(...) is null or not an object). If so, the problem is only with your 'stand alone' version of IE 6 - many of which have this feature disabled.

The code can be modified though, so that if IE can't do filters it will skip them and won't give an error.

05-09-2008, 06:19 PM
Hi John

Thanks for looking into that for me. I won't be able to test it out till Monday, and will let you know then what the outcome is.

Thanks again, have a good weekend!

05-09-2008, 06:43 PM
I had to do a few tests of my own to figure out just how to 'fix' this. In contentslider.js, replace this line:

if (targetobject.filters && targetobject.filters[0]){ //IE syntax

with these:

var ieapproved = false;
/*@cc_on @*/
/*@if(@_jscript_version >= 5)
try { ieapproved = targetobject.filters && targetobject.filters[0];
} catch(e) {ieapproved = false;}
@end @*/
if (ieapproved){ //IE syntax

Don't forget to also fix what I already mentioned in my previous post.

05-13-2008, 04:13 PM
Thanks John, that works great now! Everyone here is excited to see it in action. Much appreciated.