PDA

View Full Version : Resolved Ultimate Fade-In Slideshow and menu Machine Safari / Chrome trouble



Duffloop
04-25-2010, 01:39 PM
1) Script Title: Ultimate Fade-in slideshow (v2.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem:

I am using Menu Machine drop down menus which overlap the slideshow:

http://s-on.co.uk/cleverass/

This works fine in Firefox but not in Safari, Chrome, IE 7 or IE 8.

Without the menu it works fine:
http://s-on.co.uk/cleverass/simplicity1.html

So it appears to be a script conflict with Menu Machine.

Anyone got any ideas how to fix?

jscheuer1
04-25-2010, 03:57 PM
There is an error in the menumachine2.js file. Find this bit of code:


if (typeof(Array.shift)==_u)

Change it to:


if (typeof(Array.prototype.shift)==_u)

Duffloop
04-25-2010, 07:51 PM
Brilliant! - it works :-)

many thanks (though i'm curious how you found that error??)

jscheuer1
04-25-2010, 09:56 PM
I use many browsers to check a problem. Most have their own ways of reporting errors if you know how to get them to do it. In this particular case it was Opera that reported that it was the Array.prototype.shift that was causing a problem. I then just searched the menumachine2.js file for shift. When I found it I could (because of my experience with javascript) see the error.

That part of the code was written for browsers that don't have native shift code for arrays. Almost no one uses a browser like that these days. If they do, they would have many other problems with your and most web pages. I'm not sure if what the author did would work in those browsers or not, but I have to assume that the author thought so. It is clear that it causes a problem for at least some browsers that do have native shift code. By making the change, we guarantee that only those browsers without a native shift function will use the one created by the author. All modern browsers will use their own.

Duffloop
04-25-2010, 10:07 PM
that's interesting - must check out Opera...

Many thanks again for sorting it out!