Log in

View Full Version : How can i add descriptions?



timcadieux
08-26-2005, 06:46 PM
DHTML SlideShow
http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm

Using the above script, i'd like to add a description for each picture that changes when the picture changes?

Help!!

timcadieux
08-26-2005, 07:52 PM
I added this code, but it only runs when i use the Forward or back buttons, and each time i use it, the old text remains and the new text adds to it?


function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]

caption.innerHTML+='<b>' + desc[which] + '</b>';

<div id="caption" style="font-family:arial; font-size:13;"></div>

jscheuer1
08-26-2005, 10:54 PM
Remove the '+' sign from +=

caption.innerHTML='<b>' + desc[which] + '</b>';Add an initial caption:

<div id="caption" style="font-family:arial; font-size:13;">Put beginning caption here.</div>

timcadieux
08-29-2005, 12:56 PM
that's awesome, thx!