Ver Mensaje Individual
  #8 (permalink)  
Antiguo 21/08/2010, 04:10
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 4 meses
Puntos: 126
Respuesta: Problema con timer

Hola

Prueba así
Código Javascript:
Ver original
  1. x = 0;
  2. timer_on = 1;
  3. function moure(id)
  4. {
  5.  
  6. document.getElementById(id).style.top = x;
  7. x += 1;
  8.  
  9. if(x > 30)
  10. {
  11. document.getElementById(id).style.top = 0 +"px";
  12. x = 0;
  13. clearTimeout(t1);
  14. } esle {
  15. t1=setTimeout("moure(id)",10);
  16. }

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />