Demo at
http://www.madspiders.com/imagetest.htm
Code used in the page:
Code:
<script type="text/javascript">
var imagecnt=1;
var maximage=9;
var timeout=1000;
var imagename='testimages/carli_banks_1_000';
var imageid='myimageid';
function startit()
{
var run=window.setInterval(changeimage,timeout);
}
function changeimage()
{
imagecnt++;;
if(imagecnt>1)
{
document.getElementById(imageid).src=imagename + imagecnt.toString() + '.jpg';
}
if(imagecnt>=maximage)
{
imagecnt=1;
}
}
</script>
</head>
<body>
<img src="testimages/carli_banks_1_0001.jpg" id="myimageid" onClick="changeimage();" style="max-width:600;max-height:600;">
<br>
<script>
startit();
</script>
</body>
This is using a counter at the end of the base image name. You could have it insert into the imagename wherever you want it inserted. Since I don't know exactly where you want it inserted I just took the easy way out to show the concept.
Is that kind of what you are trying to do?
.