Hi MH, I didn't know that prototype 1.4.0 is still maintained :))
Stop kidding, can we have a live exemple ??? it's always easier to debug live (even if I don't know anyone of the 1.4.0 prototype version restriction). But just by looking to the code, why do you have this: << var title = (imgs0Slideshow[0].title) ? imgs0Slideshow[0].title : "No Title"; var caption = (imgs0Slideshow[0].caption) ? imgs0Slideshow [0].caption : "No caption"; var title = (imgsGallery[0].title) ? imgsGallery[0].title : "No Title"; var caption = (imgsGallery[0].caption) ? imgsGallery [0].caption : "No caption"; >> it seems like you override (with posted code) the good value to a fake value ? where do imgsGallery[0] is defined ?? As the whole code is not presented, it's very difficult to debug, but hope that help ?? -- david On 9 fév, 08:38, MH <m.lawrencehu...@gmail.com> wrote: > I am currently implementing an image gallery which uses the Prototype > framework 1.4.0. The problem I am having is the first image (when > loaded) does not load its title and caption also. I have set the > gallery to preload = true. > > Here is the script within my header.php: > > var imgs0Slideshow = []; > var imgs0; > imgs0Slideshow[0] = {}; > imgs0Slideshow[0].image = "http://www.culturesinbetween.net/NEWWEBSITE/ > wp-content/uploads/front-arnsdorfimg.jpg"; > imgs0Slideshow[0].title = "ARNSDORF - 'THE DAWN' AUTUMN/WINTER 2009"; > imgs0Slideshow[0].caption = " shshshshshsh"; > imgs0Slideshow[1] = new Object(); > imgs0Slideshow[1].image = "http://www.culturesinbetween.net/NEWWEBSITE/ > wp-content/uploads/front-arnsdorfimg.jpg"; > imgs0Slideshow[1].title = "Array"; > imgs0Slideshow[1].caption = " shshshshs"; > imgs0Slideshow[2] = new Object(); > imgs0Slideshow[2].image = "http://www.culturesinbetween.net/NEWWEBSITE/ > wp-content/uploads/front-arnsdorfimg.jpg"; > imgs0Slideshow[2].title = "Array"; > imgs0Slideshow[2].caption = " shshshsh"; > var start = 0; > imgs0 = new MudFadeGallery('imgs0', 'imgDisplay0', imgs0Slideshow, > {startNum: start, preload: true, autoplay: 4}); > > var title = (imgs0Slideshow[0].title) ? imgs0Slideshow[0].title : "No > Title"; > var caption = (imgs0Slideshow[0].caption) ? imgs0Slideshow > [0].caption : "No caption"; > > var title = (imgsGallery[0].title) ? imgsGallery[0].title : "No > Title"; > var caption = (imgsGallery[0].caption) ? imgsGallery[0].caption : "No > caption"; > $("imgDisplay_title").innerHTML = title; > $("imgDisplay_caption").innerHTML = caption; > $("imgDisplay_number").innerHTML = "1 of " + imgsGallery.length + " > projects"; > $("imgDisplay").src = imgsGallery[start].image; > > This is within an external js file (edited to relavant part): > > // runs right before fade begins > onFadeStart: function() { > var title = ""; > var caption = ""; > $(this.id+"_title").innerHTML = title ; > $(this.id+"_caption").innerHTML = caption; > $(this.id+"_number").innerHTML = (this.imgCurrent+1) + " of " > + > this.imgTotal + " Articles"; > }, > > // runs right after fade completes > onFadeEnd: function() { > var title = (this.imgsArray[this.imgCurrent].title) ? > this.imgsArray > [this.imgCurrent].title : "No Title"; > var caption = (this.imgsArray[this.imgCurrent].caption) ? > this.imgsArray[this.imgCurrent].caption : "No caption"; > $(this.id+"_title").innerHTML = title; > $(this.id+"_caption").innerHTML = caption; > }, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---