Simple Gallery stopped working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KeredDrahcir
    Contributor
    • Nov 2009
    • 426

    Simple Gallery stopped working

    I am using a script from Dynamic Drive which give you a fadeing slideshow. It worked fine and then I went to the site I was using today and it had just stopped working. I can't see why and I've tried recreating it locally and it doesn't work and although there are a number of questions about it on Google, none of them helpped me.
    I've tested it on several browsers and computers in different locations and it makes no difference.

    Could anybody shed any light onto what it going on?
    Code:
    <script type="text/javascript" src="/[I]my_path[/I]/js/simplegallery.js"></script>
    Code:
    			<script type="text/javascript">
    
    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [960, 178], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
    	imagearray: [
    ["/[I]my_path[/I]/images/[I]my_image1[/I].jpg","","",""],
    ["/[I]my_path[/I]/images/[I]my_image2[/I].jpg","","",""],
    ["/[I]my_path[/I]/images/[I]my_image3[/I].jpeg","", "",""],
    ["/[I]my_path[/I]/images/[I]my_image4[/I].jpeg","", "",""],
    ["/[I]my_path[/I]/images/[I]my_image5[/I].jpeg","", "",""],
    ["/[I]my_path[/I]/images/[I]my_image6[/I].jpeg","", "",""]
    ],
    	autoplay: [true, 3000, -1], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1000, //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>
    Code:
    <div id="simplegallery1">&nbsp;</div>
    Any help would be much appricated.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    first make sure there is no javascript error.

    use google chrome. it will also tell you if any file is missing.

    Comment

    • KeredDrahcir
      Contributor
      • Nov 2009
      • 426

      #3
      Thanks. I got no JavaScript errors or at least not using the Error Console on Firefox. It turned out there was a reference of a JavaScript file that I'd missed out. That sorted it.
      What worries me is how that reference disappeard since I hadn't changed the code, so who did and why?

      Comment

      • johny10151981
        Top Contributor
        • Jan 2010
        • 1059

        #4
        are you sure you didnt? check the last modified time of the concern file

        Comment

        • KeredDrahcir
          Contributor
          • Nov 2009
          • 426

          #5
          Positive. I've changed the file now to get it working so I doubt I can compare the last modified time. This is a third time in two weeks that something has been changed that I didn't do.

          Comment

          Working...