I have a very simple slider that I’ve used successfully on most of my webiste’s pages. Now I’m trying to us it twice on a page I’ve just added, but I can’t get the second one to work. I’ve tried every thing I can think of, including running the markup through a validator, but have had no luck. I’m sure it must be some simple and probably obvious error, but I just can’t find it.
Please take a look below at my functions and their corresponding .js files.
<img
src="Images/judisBefore4Thumb2-ashiko.jpg"
class="trailingPlate"
name = "slide"
width = "200"
alt="Rope-tuned, ashiko hand drum."
/>
<script type="text/javascript">
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src")
if (step<2)
step++
else
step=1
//call function "slideit()" every 3 seconds
setTimeout("slideit()",3000)
}
slideit()
//-->
</script>
js file
var image1=new Image()
image1.src=“Images/judisBefore4Thumb2-ashiko.jpg”
var image2=new Image()
image2.src=“Images/judis4Thumb2-ashiko.jpg”
****************************************************************************************************************************8
<img
src="Images/Jims-ashiko-after-thumb2.jpg"
class="trailingPlate"
name = "slideB"
height="300"
alt="Before and after picutes of a rope-tuned ashiko."
/>
<script type="text/javascript">
<!--
//variable that will increment through the images
var stepB=1
function slideitB(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slideB.src=eval("imageB"+stepB+".src")
if (stepB<2)
stepB++
else
stepB=1
//call function "slideitB()" every 3 seconds
setTimeout("slideitB()",3000)
}
slideitB()
//-->
</script>
js file
var imageB1=new Image()
imageB1.src=“Images/Jims-ashiko-before-thumb2.jpg”
var imageB2=new Image()
imageB2.src=“Images/Jims-ashiko-after-thumb2.jpg”
Thank you in advance for any help you can offer.