Results 1 to 3 of 3

Thread: Simplegallery.js help

  1. #1
    Join Date
    Apr 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Simplegallery.js help

    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.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    try no commer after last(in red)

    Code:
    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)
    	}
    })
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    Bryguth3 (07-08-2011)

  4. #3
    Join Date
    Apr 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •