PDA

View Full Version : Getting Featured Content Slider to work in IE6



waitwhat
10-21-2009, 06:50 PM
1) Script Title: Featured Content Slider v2.4

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem: Getting it to work in IE6. When I open IE6 and go to a page where I have the content slider, there is just a blank space over where the slider is supposed to be. I am able to see the pagination numbers. But, for example, if my slider is 800px wide by 400px tall, there will be a 800px wide and 400px tall blank space in IE6.

I see on the Featured Content Slider page that it is compatible with IE5+, however when I open the URL in IE6, only the very first demo is working. The other three demos do not work.

jscheuer1
10-22-2009, 11:55 AM
There could be other problems. But unless your IE 6 is filter capable, that's what will happen. I'm guessing you also have IE 7 or 8 on the same computer, if so - chances are that your IE 6 is not filter capable.

If you want more help:

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

waitwhat
10-22-2009, 12:34 PM
I wish I could post a link here, but my page with the slider is in testing mode and is only up locally.

Are you saying that the slider will work in IE6, but certain settings in my browser make it unable to do so? Yes, the same computer I am using to view the page in IE6 also has IE8. In IE8, it works perfectly.

jscheuer1
10-22-2009, 02:00 PM
Yes. Without modifications to the registry, only one IE browser per computer may use filters. Without filters, there will be an error in many scripts, including this one and the script will not work properly. However, filters are only used for the fading, so if you turn that off, ex:


featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.
enablefade: [false, 0.2], //[true/false, fadedegree]
autorotate: [true, 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)
}
})

It won't look as pretty, but it should work even in your IE 6.

Another thing you can do is to edit the contentslider.js script file. Find this line:


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

replace it with these lines:


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

That way, if any IE browser isn't filter capable, even if the init for the slider(s) calls for fading, there will be no fading, and no error. The script will still work in that browser, just without the fading transition.

waitwhat
10-22-2009, 06:51 PM
That's perfect - thanks a lot!