Make a slideshow in java?

I need a html code to create a slideshow using a function the one i am using is not working. //* var timer_on = false; function change(x){ document.getElementById('me').src = x.src; document.getElementById('aa').innerHTML = x.alt; } function startSlideShow(count){ if (timer_on ==... show more I need a html code to create a slideshow using a function the one i am using is not working.

//*
var timer_on = false;
function change(x){
document.getElementById('me').src = x.src;
document.getElementById('aa').innerHTM... = x.alt;
}
function startSlideShow(count){
if (timer_on == false)
return;
x = document.getElementById("pic" + count);
change(x);
new_count = count + 1;
if(new_count > 5)
new_count = 1;
setTimeout("startSlideShow(new_count)"...
}
*//
<!--
<table border='1px'>
<tbody>

<tr>
<th colspan='5'>Click on an image to enlarge.</th>
</tr>
<tr>
<td><img id='pic1' src='bloodhoundt-nail.jpg' alt='My favorite animal, a Bloodhound puppy.' width='100' height='100' onclick="change(this)"></td>
<td><img id='pic2' src='flowert-nail.jpg' alt='My favorite flower, the Sunflower.' width='100' height='100' onclick="change(this)"></td>
<td><img id='pic3' src='gamecockt-nail.jpg' alt='My favorite football team.' width='100' height='100' onclick="change(this)"></td>
<td><img id='pic4' src='sushit-nail.jpg' alt='This is sushi.' width='100' height='100' onclick="change(this)"></td>
<td><img id='pic5' src='pastat-nail.jpg' alt='My favorite food, pasta.' width='100' height='100' onclick="change(this)"></td>
</tr>
<tr>
<td colspan='5'><img id='me' src='me.jpg' height='800px' width='800px'></td>
</tr>
<tr>
<th id='aa' colspan='5'> lakgfalkjg;lakgj;a</th>
</tr>
<tr><td colspan='5'><input type="button" value="Start Slideshow" onclick="timer_on = true; startSlideshow(1)"> </td></tr>
<tr><td colspan='5'> <input type="button" value="Stop Slideshow" onclick="timer_on = false;"></td></tr>
-->
2 answers 2