Try this out - I modified that script to inlude a caption.
The only worry is getting NS4 to write, I can't get document.write to work. But the rest does, this just gives you the idea anyway.
I have used a table cell to write the captions to - and highlighted in green the NS problem...
The captions are written using innerHTML - so you can use any HTML tags to format them individually if you wish.
<html>
<head>
<script language="JavaScript1.1">
/*
DHTML slideshow script-
© Dynamic Drive (For full source code, usage terms, and 100's more DHTML scripts, visit */
var captions = new Array();
var photos=new Array();
var photoslink=new Array();
var which=0;
//define the captions here, keeping them with matching array index
captions[0] = "This is my first image.";
captions[1] = "This is my second image.";
captions[2] = "my hat here";
captions[3] = "a lightbulb.";
captions[4] = "This is the man in the moon.";
//define images. You can have as many as you want. Images MUST be of the same dimensions (for NS's sake)
photos[0]="../Graphics/objects/bltsandwich1b.gif"
photos[1]="../Graphics/objects/book1b.gif"
photos[2]="../Graphics/objects/hatw.gif"
photos[3]="../Graphics/objects/lightbulb1b.gif"
photos[4]="../Graphics/objects/maninthemoon1b.gif"
//Specify whether images should be linked or not (1=linked)
var linkornot=0
//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]=""
photoslink[1]=""
photoslink[2]=""
photoslink[3]=""
photoslink[4]=""
//do NOT edit pass this line
var preloadedimages= new Array()
for (var j=0;j<photos.length;j++){
preloadedimages[j]=new Image()
preloadedimages[j].src=photos[j]
}
function applyeffect(){
if (document.all){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}
function playeffect(){
if (document.all)
photoslider.filters.revealTrans.play()
}
function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}
function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
if(document.all){document.all['captionWindow'].innerHTML = captions[which];}
else if(document.getElementById){var caption = document.getElementById('captionWindow');
caption.innerHTML = captions[which];
}
else if(document.layers){document.layers['captionWindow'].document.write(captions[which])}
playeffect()
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which];
if(document.all){document.all['captionWindow'].innerHTML = captions[which];}
else if(document.getElementById){var caption = document.getElementById('captionWindow');
caption.innerHTML = captions[which];
}
else if(document.layers){document.layers.captionWindow.document.write(captions[which])}
playeffect()
keeptrack()
}
}
function transport(){
window.location=photoslink[which]
}
</script>
<title>DHTML slide show with captions</title>
</head>
<body style='font-family:Tahoma;background-color:gray;color:white'>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="2" height="22"><center>
<script>
if (linkornot==1)document.write('<a href="javascript:transport()">')
document.write('<img src="'+photos[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1) document.write('</a>')
</script>
</center></td>
</tr>
<tr>
<!-- This cell contains the captions -->
<td width="100%" height="21" colspan=2 id='captionWindow'>This is picture one</td>
<!-- end captions -->
</tr>
<tr>
<td width="50%" height="21"><p align="left"><a href="javascript:void(0)" onClick="backward();return false">Previous Slide</a></td>
<td width="50%" height="21"><p align="right"><a href="javascript:void(0)" onClick="forward();return false">Next Slide</a></td>
</tr>
</table>
<p align="center"></p>
</body>
</html>
Like it says, make sure the images are the same size, or NS4 will stretch/shrink them.
You just need to fill in the captions, and put in your images, and find out how to write to a table cell in NS4.
b
2 - benbiddington@surf4nix.com
"Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer"