PDA

View Full Version : fade in slide show works fine in FF but not IE



J_Quest
10-22-2009, 12:02 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: Works wonderfully in FireFox at
http://locksmithbill.com/Baldinos_Safe_Landing_Page.htm

but I receive an error when using IE8 as follows:

Line: 37
Error: 'imagearray[...].0' is null or not an object

It doesn't seem likely there is anything wrong because it works so well in Firefox. I have checked my Internet Explorer security settings and your slideshow, using your URL, works fine. I have not edited anything in fadeinslideshow.js

jscheuer1
10-22-2009, 02:24 PM
Same error in IE 7. It's a typo of sorts on your part. In your (from the code on the page):



var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [750, 251], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["../images/We_sell_all_types_of_safes2.jpg"], //"", "", "We sell all types of safes."],
["../images/Fire_Safes2.jpg"], //"http://locksmithbill/images/Fire_Safes2.jpg", "_new", "Liberty makes excellent fire safes"],
["../images/Gun_Safes6.jpg"],
["../images/Gun_Safes8.jpg"], //"", "", "Liberty's manufacturing facility is extremely efficient"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})

See the highlighted line. You've added (or after editing, allowed to remain) a comma (red) that doesn't belong. Most other browsers now error correct for this, but technically no trailing comma is allowed internally at the end of arrays or objects. IE is still strict about this. So just get rid of it and things should be fine.