After messing around with this script more than I probably should have, I did discover a way to add text above each image but, that is a bad idea. I see no attempt made to add:

Originally Posted by
rxsid
links that are next to each respective image
in the code from your post unless you mean the built in link availability of the images to have links that is already in this script.
The reason it is a bad idea to add text above each or any of the images in the sliding display is that text size, unlike image size, cannot be controlled independently from the user agent (people's browsers). So, even if you get it looking good on your browser, you have no idea how it will look on other folks' browsers. A better approach would be to add onmouseOver/onmouseOut events to each image that would display descriptive text above or below the sliding display when the image is hovered over. You could leave plenty of room for this so that no matter what size the text was displayed as, it would still look reasonable. Here's how:
Add this right before the script:
HTML Code:
<table><tr><td align="center" id="caparea"> </td></tr><tr><td>
and this right after it:
HTML Code:
</td></tr></table>
Change the leftrightslide Array to look like this:
Code:
//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img onmouseOver=dcap("0") onmouseOut=dcap() src="dynamicbook1.gif" border=1></a>'
leftrightslide[1]='<a href="http://"><img onmouseOver=dcap("1") onmouseOut=dcap() src="dynamicbook2.gif" border=1></a>'
leftrightslide[2]='<a href="http://"><img onmouseOver=dcap("2") onmouseOut=dcap() src="dynamicbook3.gif" border=1></a>'
leftrightslide[3]='<a href="http://"><img onmouseOver=dcap("3") onmouseOut=dcap() src="dynamicbook4.gif" border=1></a>'
leftrightslide[4]='<a href="http://"><img onmouseOver=dcap("4") onmouseOut=dcap() src="dynamicbook5.gif" border=1></a>'
Add this Array just above it:
Code:
//Specify Captions
var cap=new Array()
cap[0]='Synergy Multi-Vitamin'
cap[1]='Description #2 Here'
cap[2]='Description #3 Here'
cap[3]='Description #4 Here'
cap[4]='Description #5 Here'
Add this function:
Code:
function dcap(theCap){
if (theCap==undefined)
document.getElementById('caparea').innerHTML=' '
else
document.getElementById('caparea').innerHTML=cap[theCap]
}
just below the line:
Code:
////NO NEED TO EDIT BELOW THIS LINE////////////
That's it!
Bookmarks