PDA

View Full Version : Simple Controls Gallery JS error



urbancool
02-26-2009, 03:36 PM
1) Script Title: Simple Controls Gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem:

I've had no problems in getting the script to work, or even multiple instances of it to work.. however.. IE is now throwing up an error from within the untouched .js file!

it gives this:
Line: 35
Char: 3
Error: 'imagearray[...].-0' is null or not an object
Code:0

can anybody help... i don't understand what's gone wrong!
all i did was download from here, and re-upload onto my server...

thanks in advance peeps..

ddadmin
02-26-2009, 08:44 PM
You need to remove the comma (') in red at the end of the following 3 code chunks on your page:


imagearray: [
["images/test1.jpg", "", "", "Rats."],
["images/test2.jpg", "", "", "Squirrels."],
],


imagearray: [
["images/test1.jpg", "", "", "Rats."],
["images/test2.jpg", "", "", "Squirrels."],
],

imagearray: [
["images/test1.jpg", "", "", "Rats."],
["images/test2.jpg", "", "", "Squirrels."],
],

IE requires that no comma follows the very last array element, while other browsers don't.

BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm