Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/09/2009, 04:16
frmfernando
 
Fecha de Ingreso: junio-2008
Mensajes: 287
Antigüedad: 16 años
Puntos: 1
Código para cambiar fotos cada cierto tiempo

Hola buenos días.

Encontré un código lo he probado en una página en blanco y me funciona, pero en el momento de adaptarlo a la página que estoy creando no me funciona.

Aqui les dejo el código

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<
html>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<
title>Documento sin t&iacute;tulo</title>

<
link href="dolors.css" rel="stylesheet" type="text/css">
<
style type="text/css">
<!--
.
Estilo2 {color#FFFFFF}
-->
</
style>

<
script language="javascript">
step=0;
function 
autoImgFlip() {
if (
step 4) {step++;}
else {
step=0;}
if (
step==0)
{
a.src="imagenes/foto01.png";}
if (
step==1)
{
a.src="imagenes/foto02.png";}
setTimeout("autoImgFlip()"3000);
if (
step==2)
{
a.src="imagenes/foto03.png";}
if (
step==3)
{
a.src="imagenes/foto04.png";}
}

</script>


</head>


<body class="dolors" onLoad="autoImgFlip();">

<div align="center">
  <table width="950" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
      <td width="700" height="60" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
          <!--DWLayoutTable-->
          <tr>
            <td width="192" height="60" align="left" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
            <td width="508">&nbsp;</td>
          </tr>
      </table></td>
    <td width="250" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
        <!--DWLayoutTable-->
        <tr>
          <td width="240" height="60" align="right" valign="middle">| Catalan | Catellano | Frances | Ingles | </td>
        <td width="10" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
        </tr>
    </table></td>
    </tr>
    <tr>
      <td height="1" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <!--DWLayoutTable-->
          <tr>
            <td width="950" height="1"></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="30" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <!--DWLayoutTable-->
          <tr>
            <td width="130" height="30" align="center" valign="middle" class="Estilo2">CONTABILIDAD</td>
          <td width="180" align="center" valign="middle"><span class="Estilo2">GESTI&Oacute;N TRIBUTARIA</span> </td>
          <td width="130" align="center" valign="middle" class="Estilo2">CONSULTOR&Iacute;A</td>
          <td width="200" align="center" valign="middle" class="Estilo2">RECUPERACI&Oacute;N DEL IVA </td>
          <td width="140" align="center" valign="middle" class="Estilo2">NO RESIDENTES </td>
          <td width="30">&nbsp;</td>
          <td width="140" align="center" valign="middle" class="Estilo2">QUIENES SOMOS </td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="1" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <!--DWLayoutTable-->
          <tr>
            <td width="950" height="1"></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="160" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
          <!--DWLayoutTable-->
          <tr>
            <td width="700" height="160">&nbsp;</td>
          </tr>
      </table></td>
      <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
          <!--DWLayoutTable-->
          <tr>
            <td width=250 height=160 align="right" valign="top"><img src="imagenes/foto01.png" id="a" width="250" height="160"></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="1"></td>
      <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <!--DWLayoutTable-->
          <tr>
            <td width="250" height="1"></td>
          </tr>
      </table></td>
    </tr>
  </table>
</div>
</body>
</html> 
Se carga la foto01.png pero a partir de hay no me hace nada más, no se cambian las fotos.

Algún experto que me pueda decir donde tengo el fallo?

Muy amables y muchas gracias.