I have a rotating slide show I'm working on that uses Javascript. I use a counter in the function, and I want to display the value of the counter each time the image changes. (so it will say "viewing i of x pictures")
I tried using
<script language="javascript" type="text/javascript">document.write(i);</script>
but it only displays the value of i when the page loads, and it won't update each time i increases. Is there something better than document.write(i) that will update each time i increases or decreases?