Advanced Search

Results 1 to 3 of 3

Thread: Simple Gallery

  1. #1
    Join Date
    Dec 2006
    Location
    South Africa
    Posts
    78
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Simple Gallery

    http://www.dynamicdrive.com/dynamici...plegallery.htm

    I am using this and it works just fine with FF and I have already published.

    With IE6 I keep getting javascript errors and my son tested on IE8 with the same errors, for some reason I cannot upgrade to IE 7 on my machine (using XP Pro)

    As most folk this side of the big pond still use IE as a default, I need a fix on this.

    Here is the error I get

    Line:35
    Char:3
    Error:Imagearray [...]0' is null or not an object
    Code:0
    If I edit the "0" in the .js file the error keeps on migrating to the following lines.

    Links
    http://www.lbk.co.za/Const/renovate/...k_cladding.htm

    I've looked at version 2.1 but I actually like this one better

    Rgds

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,677
    Thanks
    43
    Thanked 3,126 Times in 3,092 Posts
    Blog Entries
    12

    Default

    You have an extra comma here (highlighted) at the end of your imagearray:

    Code:
    <script type="text/javascript">
    
    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [315, 300], //width/height of gallery in pixels. Should reflect dimensions 
    	//of the images exactly
    	imagearray: [
    		//["path_to_image", "optional_link", "optional_linktarget", "optional_textdescription"]
    		["../Renovate/Images/RockClad/Complete.jpg", , ,"Rock Cladding in Stone finish"],
    		["../Renovate/Images/RockClad/RockClad.jpg", , ,"Rock Cladding in Stone finish" ],
    		["../Renovate/Images/RockClad/Courtyard.jpg", , , ],
    		["../Renovate/Images/RockClad/PoolPave.jpg", , , ],
    		["../Renovate/Images/RockClad/PoolPave1.jpg", , , "Constantia Octal Pavers"],
    		["../Renovate/Images/RockClad/Driveway.jpg", , ,"Ballito Pavers" ],
    		["../Renovate/Images/RockClad/lapa.jpg", , ,"Modular Cladding" ],
    		["../Renovate/Images/RockClad/IndoorPave.jpg", , ,"Franschoek Tiles" ],
    		["../Renovate/Images/RockClad/Rome.jpg", , ,"Rome Pavers"],
    		["../Renovate/Images/RockClad/Corner.jpg", , ,"Corner Stones"],
    		["../Renovate/Images/RockClad/Capstone.jpg", , ,"Cap Stones"],
    		["../Renovate/Images/RockClad/Kerbing.jpg", , , "Kerbing Stones"],
    		["../Renovate/Images/RockClad/Uvongo.jpg", , , "Uvongo Pavers"],
    		["../Renovate/Images/RockClad/Swellendam.jpg", , ,"Swellendam Tiles"],
    		["../Renovate/Images/RockClad/Paternoster.jpg", , ,"Paternoster Pavers" ],
    		["../Renovate/Images/RockClad/PaternosterHalf.jpg", , ,"Paternoster Half Pavers" ],
    		["../Renovate/Images/RockClad/Constantia.jpg", , ,"Constantia Pavers"],
    		["../Renovate/Images/RockClad/ConstantiaHalf.jpg", , ,"Constantia Half Pavers" ],
    		["../Renovate/Images/RockClad/SatinTiles.jpg", , ,"SatinTiles" ],
    		["../Renovate/Images/RockClad/MaricoTiles.jpg", , ,"Marico Tiles" ],
    		["../Renovate/Images/RockClad/ChakasPavers.jpg", , ,"Chakas Pavers" ],
    
    	],
    	autoplay: [true, 3500, 10], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    		//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
    	},
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//Keyword "this": references current gallery instance
    		//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)
    	}
    })
    
    </script>
    This is technically a syntax error, but most browsers now correct for it (there was a time when none did), now - as far as I know - IE is the only holdover, though there may be others. In any case, get rid of it and things should be fine.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2006
    Location
    South Africa
    Posts
    78
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    You have an extra comma here (highlighted) at the end of your imagearray:

    Code:
    <script type="text/javascript">
    
    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [315, 300], //width/height of gallery in pixels. Should reflect dimensions 
    	//of the images exactly
    	imagearray: [
    		//["path_to_image", "optional_link", "optional_linktarget", "optional_textdescription"]
    		["../Renovate/Images/RockClad/Complete.jpg", , ,"Rock Cladding in Stone finish"],
    		["../Renovate/Images/RockClad/RockClad.jpg", , ,"Rock Cladding in Stone finish" ],
    		["../Renovate/Images/RockClad/Courtyard.jpg", , , ],
    		["../Renovate/Images/RockClad/PoolPave.jpg", , , ],
    		["../Renovate/Images/RockClad/PoolPave1.jpg", , , "Constantia Octal Pavers"],
    		["../Renovate/Images/RockClad/Driveway.jpg", , ,"Ballito Pavers" ],
    		["../Renovate/Images/RockClad/lapa.jpg", , ,"Modular Cladding" ],
    		["../Renovate/Images/RockClad/IndoorPave.jpg", , ,"Franschoek Tiles" ],
    		["../Renovate/Images/RockClad/Rome.jpg", , ,"Rome Pavers"],
    		["../Renovate/Images/RockClad/Corner.jpg", , ,"Corner Stones"],
    		["../Renovate/Images/RockClad/Capstone.jpg", , ,"Cap Stones"],
    		["../Renovate/Images/RockClad/Kerbing.jpg", , , "Kerbing Stones"],
    		["../Renovate/Images/RockClad/Uvongo.jpg", , , "Uvongo Pavers"],
    		["../Renovate/Images/RockClad/Swellendam.jpg", , ,"Swellendam Tiles"],
    		["../Renovate/Images/RockClad/Paternoster.jpg", , ,"Paternoster Pavers" ],
    		["../Renovate/Images/RockClad/PaternosterHalf.jpg", , ,"Paternoster Half Pavers" ],
    		["../Renovate/Images/RockClad/Constantia.jpg", , ,"Constantia Pavers"],
    		["../Renovate/Images/RockClad/ConstantiaHalf.jpg", , ,"Constantia Half Pavers" ],
    		["../Renovate/Images/RockClad/SatinTiles.jpg", , ,"SatinTiles" ],
    		["../Renovate/Images/RockClad/MaricoTiles.jpg", , ,"Marico Tiles" ],
    		["../Renovate/Images/RockClad/ChakasPavers.jpg", , ,"Chakas Pavers" ],
    
    	],
    	autoplay: [true, 3500, 10], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    		//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
    	},
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//Keyword "this": references current gallery instance
    		//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)
    	}
    })
    
    </script>
    This is technically a syntax error, but most browsers now correct for it (there was a time when none did), now - as far as I know - IE is the only holdover, though there may be others. In any case, get rid of it and things should be fine.
    Thanx John, I was hoping you would still be here, helps dumbasses (old farts) like me to see the wood for the trees, fixed thanx.

    Bernie

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
  •