PDA

View Full Version : Simplegallery.js help



Bryguth3
07-08-2011, 02:29 PM
I am currently using simplegallery.js here:
http://cassidytreeandlandscape.com/index.html

It works in Firefox but I receive this error on Internet Explorer:
Webpage error details

Message: 'imagearray[...].0' is null or not an object
Line: 43
Char: 3
Code: 0
URI: http://cassidytreeandlandscape.com/simplegallery.js

I didn't modify any of the code except for the part that involves the images for the navigation and images for the show. Attached is my javascript. Any and all help is greatly appreciated.

vwphillips
07-08-2011, 03:01 PM
try no commer after last(in red)


var mygallery=new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["images/slide1.jpg", "", "", ""],
["images/slide2.jpg", "", "", ""],
["images/slide3.jpg", "", "", ""],
["images/slide4.jpg", "", "", ""],
["images/slide5.jpg", "", "", ""],
["images/slide6.jpg", "", "", ""],
["images/slide7.jpg", "", "", ""],
["images/slide8.jpg", "", "", ""],
["images/slide9.jpg", "", "", ""],
["images/slide10.jpg", "", "", ""],
["images/slide11.jpg", "", "", ""],
["images/slide12.jpg", "", "", ""],
["images/slide13.jpg", "", "", ""],
["images/slide14.jpg", "", "", ""],
["images/slide15.jpg", "", "", ""],
["images/slide16.jpg", "", "", ""] // no commer after last field
],
autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: false,
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
},
onslide:function(curslide, i){ //event that fires after each slide is shown
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})

Bryguth3
07-08-2011, 03:40 PM
Vic,
Thanks for the quick response. Made the change but received a new error in IE:

Message: Expected '}'
Line: 58
Char: 2
Code: 0
URI: http://cassidytreeandlandscape.com/index.html