views:

56

answers:

1

I am trying to implement SlideShow of google in my site www.tapasya.co.in. You can see it on home page. The problem is that i m not being able to add images dynamically such that it can take all the images automatically from folder that i m specifying.

Currently i have to add each nd every image in javascripts data array.

Is it their a way so that i need not add images to this array.

 <script type="text/javascript">  
 //<![CDATA[
   window.addEvent('domready', function(){
     var data = {
       '1.jpg': { caption: 'Volcano Asención in Ometepe, Nicaragua.' }, 
       '2.jpg': { caption: 'A Ceibu tree.' }, 
       '3.jpg': { caption: 'The view from Volcano Maderas.' }, 
       '4.jpg': { caption: 'Beer and ice cream.' }
     };
     var myShow = new Slideshow.KenBurns('show', data, {captions: false, controller: false, delay: 5000, duration: 10000, height: 200, hu: '../Scripts/SlideShow/images/', thumbnails: false, width: 990, linked: true});
          var box = new Lightbox({ 
          'onClose': function(){ this.pause(false); }.bind(myShow), 
          'onOpen': function(){ this.pause(true); }.bind(myShow) 
       });

   });
 //]]>
 </script>

Is it their any way so that it can read the file name, caption and hyperrefrence if any from xml file

A: 

Yes, you should be able to do it. I'm not a Mootools expert, but it does have some AJAX functions built in. The documentation for them is here: http://mootools.net/docs/core/Request/Request So, try reading though the docs to get an idea of what it can do. But basuically, you should be able to change your 'data' variable to be the return value from onr of the AJAX request functions. Good luck.

Chibu