Any help please need a banner rotating code

This works fine

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Rotating Banners</title>

<script language="Javascript" type="text/javascript">
adImages = new Array("images/1.jpg","images/2.jpg","images/3.jpg")
thisAd = 0
imgCt = adImages.length

function rotate() {
if (document.images) {
thisAd++
if (thisAd == imgCt) {
thisAd = 0
}

document.adBanner.src=adImages[thisAd]
setTimeout("rotate()", 3 * 1000)
}
}
// End hide script from old browsers -->
</script>
</head>

<body onload="rotate()">
<center>
<img src="images/1.jpg" name="adBanner" alt="Ad Banner" />
</center>
</body>
</html>

You just need to specify the images in the array, the timing can be set using the 'setTimeout' function.
 
Back
Top Bottom