PDA

View Full Version : Featured Content Slider compatibility issues



SkellieSue
10-31-2006, 07:59 PM
1. Featured Content Slider

2. http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3. After correcting a coding error (I neglected to close a div) I'm still having compatibility issues with this script in IE5 and Netscape 7.1 & 8.1.

My problem in IE5 (5.00.2314):
The script generates a javascript error and doesn't load, leaving a white space where the contentdivs should be. The error message reads:

Line: 22
Char: 1
Error: Object doesn't support this property or method
Code: 0

My problem in Netscape (7.1 and 8.1)
The initial load is fine, but as the "slides" (contentdivs) cycle through, either automatically or manually, the pagination div drops down the height of the contentdiv. The second contentdiv drops it down one height, the third two heights, etc. It's as if the divs are stacking invisibly on top of the rest of content on the page, forcing the pagination div further down the page as each contentdiv loads.

This is a very cool script that's perfect for what I'd like to do with my main page, and I'd greatly appreciate any advice and/or assistance in overcoming these compatibility issues. I'd also like to thank the owners/maintainers of this site for the great scripts and clear instructions provided; I've been using Dynamic Drive scripts for over five years and it's a testament to your knowledge and dedication that this is the first time I've had to ask for help.

My test page is uploaded here:
http://www.merkatcross.com/test/index.htm

(My apologies for the edits: Though I spent several hours going over my code looking for errors, I didn't see that I hadn't closed a div until after I posted my first message. And another apology if I should have added a new comment instead of editing - and if this message isn't coherent. I've been working on this for a couple of days, trying to get the script to function and look the same in the range of browsers I test for compatibility in when I make changes on my site.)

tech_support
10-31-2006, 09:43 PM
Sticky

SkellieSue
11-01-2006, 12:22 PM
I've solved the Netscape problem (I had the closing div for the slider1 div coded in after the pagination div ... duh), but am still having IE 5 issues. The way things are going with this I may end up solving that by the end of the day too. For some reason posting in a public forum and making a fool of myself seems to inspire me to consider solutions I wouldn't have otherwise. ;)

SkellieSue
11-02-2006, 01:02 PM
Just tidying things up here by saying I'm unable to find a reason why this script generates a Javascript error in the version of IE5 I have installed on one of my old systems. It's unfortunate that I have to deal with the nightmare that is IE5 anyway, but a considerable amount of my visitors still use this browser - mostly schools and libraries that haven't upgraded for some unfathomable reason.

Regardless, I downloaded the script on October 29th, noting that it was revised on the 28th. Yesterday, (in desperation and frustration) as a further test to see if perhaps I missed something in my code that was conflicting with the script in IE5, I saved the html from the above referenced Dynamic Drive page (the page on which the demo appears), stripped out all other scripts, and it generated the same Java Script error that appears in my first post. I suppose it could be due to the version of IE5 that I have installed, but I'm Javascript-stupid and have no idea where to begin to look for the cause of the error, nor how to fix it.

I've decided to use the pre-Ajax Tabbed Content script instead (http://www.dynamicdrive.com/dynamicindex17/tabcontent2.htm), and though I really wish it had an automatic cycling option, I've tested it thoroughly and it doesn't generate a Javascript error in IE5 - and that, unfortunately, is a higher priority on my site than the auto slide feature.

Thanks for all the great scripts and the opportunity to ask for help with them. I found something that will work for my particularly archaic situation and can now start obsessing about something else. :)

ddadmin
11-02-2006, 09:14 PM
Hmm what version of IE5.x are you using? If I have time I'll fire up that browser on my old computer to see if there's a quick fix for the issue. IE5.x is not a priority now though when testing scripts on it for compatibility, since overall on the web, most people have moved on.

SkellieSue
11-03-2006, 12:49 AM
I have 5.00.2314 installed. It's the oldest version of IE5 that I could find, and yeah ... I only fire it up for compatibility testing. It irritates me that I have to make IE5 compatibility a priority due to the number of schools that hit my site that haven't upgraded, but I do what I have to do to keep them coming in. I understand that I'm in an unusual situation though, so while it would be great if there is a quick fix, I understand that it isn't a priority.

Thanks. :)

ddadmin
11-03-2006, 01:50 AM
Ok, not sure if there are any other bugs, but to get this script to at least work without errors in IE5.0, find the line inside contentslider.js:


slidernodes[sliderid].push(alldivs[i]) //add this DIV reference to array

and replace it with:


slidernodes[sliderid][slidernodes[sliderid].length]=alldivs[i]

Looks like IE5 doesn't support array.push()...

SkellieSue
11-03-2006, 02:19 PM
Well, it works but (always seems to be one of those, eh?) ...

The page loaded fine without generating a Javascript error, but when the slide function kicks in, it hangs for a second, then I get a "This program has performed an illegal operation and will be shut down" error message. When I click "Close" on the message box, another message pops up that says, "There was an internal error." If I leave that message up there (not X-ing out, or clicking "OK") behind it I can see the slider performing perfectly.

I think I'm going to stay with the pre-Ajax Tabbed Content script. It's a great alternative, and I've edited the CSS so it looks identical to how I had the Featured Content Slider set up (other than the slider function, of course, but I can live without that.) I appreciate your time and help, but dealing with the dinosaur that is IE5 is such a pain, I'd hate to waste any more of your time on this.

Thanks. :)

jscheuer1
11-03-2006, 07:35 PM
Well, it works but (always seems to be one of those, eh?) ...

The page loaded fine without generating a Javascript error, but when the slide function kicks in, it hangs for a second, then I get a "This program has performed an illegal operation and will be shut down" error message. When I click "Close" on the message box, another message pops up that says, "There was an internal error." If I leave that message up there (not X-ing out, or clicking "OK") behind it I can see the slider performing perfectly.

I think I'm going to stay with the pre-Ajax Tabbed Content script. It's a great alternative, and I've edited the CSS so it looks identical to how I had the Featured Content Slider set up (other than the slider function, of course, but I can live without that.) I appreciate your time and help, but dealing with the dinosaur that is IE5 is such a pain, I'd hate to waste any more of your time on this.

Thanks. :)

What type of IE 5 are you using? Unless you were testing on a Mac or PC with IE 5 installed without any other IE browsers on the machine, that error might not be from the script at all. I have these "stand-alone" versions of IE 4 through 5.5 on another computer for testing purposes. They all require IE 6 be installed on the machine to function properly. At some point, one of them started giving that sort of error no matter what I put into it but, as long as I didn't click OK or X to close the dialogue or anything, it would work fine. I always just assumed that this was some problem with the "stand-alone" implementation that had crept in with some update to IE 6 that occurred with 'Live Update' somewhere along the line and just ignored it.

SkellieSue
11-03-2006, 09:08 PM
Hi John,

The version I have installed is IE5 5.00.2314 on an old 486 PC running Win95, one of several old system I've kept for compatibility testing purposes. It's the only browser installed on that system. I installed it from the Browsers folder on an old AOL disk (Version 4.0), which, I realize, throws a dicey element into the equation, but other Dynamic Drive scripts that are listed as IE 5+ compatible run without a problem on it.

I was thinking (which is dangerous, since I know next to nothing about Javascript) that something that was included in the updated script to allow the content to load via Ajax may be conflicting with IE5. That thought stems from the pre-Ajax Tabbed Content script (http://www.dynamicdrive.com/dynamicindex17/tabcontent2.htm) running without an error, though I admit I didn't try the updated Tabbed Content script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) to test my theory. I realize I have an usual (and archaic) system for testing and this problem could be due to my setup, and not a global IE5 compatibility problem.

Thanks. :)

jscheuer1
11-03-2006, 09:23 PM
Well, in IE, Ajax depends upon the availability of the activeX:


else if (window.ActiveXObject){ // if IE
try {
httprequest=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
try{
httprequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}

There is a very good chance that IE 5 either doesn't fully support it and a very good chance that IE 5 doesn't support try/catch. Any browser that doesn't will barf on such code as, way before it was implemented, try was a reserved word and as such could not be used in javascript at all.

ddadmin
11-03-2006, 11:07 PM
Hmm well the modification I provided results in a working script (for me at least) in IE5.0 (Win XP). Apart from the CSS still needing some tweaking, the script works and I can select various contents to view.

Perhaps your OS (Win 95) also plays a factor in this? I have no idea if IE5 differs slightly between OSes.

But to rule out any possibility (I don't see how this could effect anything), I've included a version of contentslider.js that removes the Ajax feature. You can see if that works for you in IE5, thought I doubt it makes a difference.

SkellieSue
11-03-2006, 11:55 PM
Thanks. I've saved the file and will give it a try in the morning. I'll let you know what happens. And I really appreciate the time you guys are spending on this, because, as I said, I'm content with the Tabbed Content script - it will work well for my site - it's just that the slider thing is just so, well ... cool. :)

SkellieSue
11-04-2006, 12:34 AM
I didn't think I'd have time this evening to try this, but I did after all. First thing I did was run Scandisk, because I can't remember the last time I did any sort of maintenance on that system. There were no errors found.

Tried the new .js and the same thing happened - "This program has performed an illegal operation ..." etc. Then something you said struck me - that you could select content and it worked fine. So, I changed this:

<div class="pagination p1" id="paginate-slider1">
<script type="text/javascript">
ContentSlider("slider1", 3000)
</script>
</div>

To this:

<div class="pagination p1" id="paginate-slider1">
<script type="text/javascript">
ContentSlider("slider1")
</script>
</div>

... And I didn't get an error message; I went through each of the contentdivs and back again without any problems, which leads me to suspect that the error I'm getting has something to do with the auto slide function/feature. Again, that could just be my particular setup, but I thought I'd let you know what I've done to try to pin down what's causing the (my) error.

Thanks, again. :)

jscheuer1
11-04-2006, 06:11 AM
I tried this out earlier on my 'stand-alone' IE 5.01. Notice that it is a slightly different version than your 5.00.2314, SkellieSue. It is not the one that I had mentioned having problems with before (that one was the 5.5 version), and it (the 5.01) did fine with DD's most recent contentsider.js. I'm wondering what the exact version number DD is testing on? If it is also from the 'stand-alone' collection available at quirksmode.org (where I got mine), then DD is probably using the same one as I am, also different from yours. If there was a reason 5.01 was chosen for the quirksmode 'stand-alone'. I think that it's because it was the last stable version before 5.5. If so, I would think that most folks using 5.0 as their primary browser would be using 5.01.

ddadmin
11-04-2006, 06:28 AM
Ah John yes I was just about to comment on this. Upon close inspection I realized the version of IE5.0 I was testing the script on is in fact IE5.01. As mentioned, this version had no trouble with the script after my initial posted change to the script. And I think like you said, IE5.01 should be the norm among IE5.0 users.

SkellieSue
11-04-2006, 01:59 PM
I've just gone to quirksmode.org, downloaded and installed IE 5.01 and yes, indeed, the script works beautifully. Thanks so much for mentioning it; I'd never seen that site before and have bookmarked it for browsing later. And yes, I looked at the IE breakdown in my stats for last month and IE 5.01 had almost twice as many users as IE 5.0.

Thanks again for your time. :)