Click to See Complete Forum and Search --> : Adding alt text to a JS slideshow


sgcroxton
09-14-2003, 02:13 PM
How does one go about adding alt text to the images in a JavaScript slide show? Here's the script:

<script language="JavaScript1.1">
<!--

//specify interval between slide (in mili seconds)
var slidespeed=3000

//specify images
var slideimages=new Array("hammons_sketch_ttl.gif","hammons_e_rend_ttl.gif","hammons_rend_ttl.gif","hammons_sign_ttl.gif","hammons_pic0_ttl.gif","hammons_pic1_ttl.gif","hammons_pic3_ttl.gif","hammons_pic4_ttl.gif","hammons_pic5_ttl.gif","hammons_pic6_ttl.gif")

//specify corresponding links
var slidelinks=new Array("index_orig.html","index_orig.html","index_orig.html",
"index_orig.html","index_orig.html","index_orig.html","index_orig.html","index_orig.html","index_orig.html")

var newwindow=0 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//-->
</script>

Thanks!

SG Croxton
Missouri

Khalid Ali
09-14-2003, 03:44 PM
you should be able to do that below this line
imageholder[i].src=slideimages[i]
imageholder[i[.alt="Some value";