Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/03/2011, 17:00
Avatar de zeuzft
zeuzft
 
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 10 meses
Puntos: 2
Exclamación no me muestra contador

he implementado este codigo con fechas dinamicas pero el problema es que al momento de mostrar la info no lo hace:
Código:
<!--
function getTime() {
now = new Date();
y2k = new Date("<?=$at1;?> <?=$at2;?> <?=$at3?> 24:00:00");
days = (y2k - now) / 1000 / 60 / 60 / 24;
daysRound = Math.floor(days);
hours = (y2k - now) / 1000 / 60 / 60 - (24 * daysRound);
hoursRound = Math.floor(hours);
minutes = (y2k - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
minutesRound = Math.floor(minutes);
seconds = (y2k - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
secondsRound = Math.round(seconds);
sec = (secondsRound == 1) ? " second" : " seconds";
min = (minutesRound == 1) ? " minute" : " minutes, ";
hr = (hoursRound == 1) ? " hour" : " hours, ";
dy = (daysRound == 1) ? " day" : " days, "
//dias
document.timeForm.inputr0.value = daysRound;
//horas
document.timeForm.inputr1.value = hoursRound;
//minutos
document.timeForm.inputr2.value = minutesRound;
//segundos
document.timeForm.inputr3.value =secondsRound;

newtime = window.setTimeout("getTime();", 1000);
}
// -->
aqui es donde muestro pero no me muestra la cuenta regresiva; claro esta en el bodyonload llamo a la funcion:
Código PHP:
<td width='200' valign='top' align='center'>
                <
form name='timeForm'>
                <
table border='1' color='white' cellspacing='4' cellpadding='0'>
                    <
tr>
                        <
td>
                            <
input type="text" name="inputr1" size="3" disabled style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid;font:24px arial, helvetica,sans-serif;background-color: #000000;border-style:none;color:white;text-align:center;">
                        </
td>
                        <
td>
                            <
input type="text" name="inputr2" size="3" disabled style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid;font:24px arial, helvetica,sans-serif;background-color: #000000;border-style:none;color:white;text-align:center;">
                        </
td>
                        <
td>
                            <
input type="text" name="inputr3" size="3" disabled style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid;font:24px arial, helvetica,sans-serif;background-color: #000000;border-style:none;color:white;text-align:center;">
                        </
td>
                    </
tr>
                    <
tr>
                        <
td>
                            
Horas
                        
</td>
                        <
td>
                            
Min
                        
</td>
                        <
td>
                            
Seg
                        
</td>
                    </
tr>
                </
table>
                </
form>
            </
td