Hi, Lloyd!
You can use this Javascript code for you carousel:
var lista = new Array('1.jpg', '2.jpg', '3.jpg' , '4.jpg');
var contador = 0;
var tiempo = 0;
var tempor = null;
function cambio(sen)
{
contador+= sen;
if (contador ==lista.length)
contador = lista.length-1;
else
if (contador < 0) contador = 0;
document.images.centro.src = lista[contador]
window.status="Imagen número "+contador
}
function reset()
{
contador = 0;
fin = false;
document.images.centro.src = lista[0]
}
function automat(seg)
{
tiempo = parseInt(seg);
reset();
window.status="Pase automático";
if (isNaN(tiempo) || tiempo <= 0)
alert("Error en el tiempo")
else
tempor = setTimeout("pasar()", tiempo)
}
function parar()
{
clearTimeout(tempor);
}
function pasar()
{
cambio(1);
if (contador < lista.length-1)
tempor = setTimeout("pasar()", tiempo)
}
Remember, you must include labels <script> and </script> in the beginning
and in the end of the code. I have made it for four images, but you can put
whatever you want.
Sorry, my english isn't very good...
"Lloyd Codrington" escribió:
I am building a site and have a few banners I wish to display. Can anyone
help me code a delay that would then load the next banner? Each banner code
is in HTML and includes a link to an external site.