[Javascript] live counter help!!!

S.F. Alim salim at vodatel.com
Mon May 9 00:36:29 CDT 2005

I will try it now


-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On
Behalf Of Eligio Morgado
Sent: Sunday, May 08, 2005 6:53 PM
To: [JavaScript List]
Subject: Re: [Javascript] live counter help!!!

Try something like:

// This in <head>

<script language="javascript">
  var nTotal = 0;

  function fncUpdate()
    document.getElementById("lblTotal").innerHTML = ++nTotal;

    setTimeout("fncUpdate()", 1000);

// add this in <body>

<body onLoad="javascript:fncUpdate();">

<div id="lblTotal">&nbsp;</div>

Good luck!

On 5/8/05, S.F. Alim <salim at vodatel.com> wrote:
> Hi list,
> Im just a beginner in programming world and javascript is like a black
> for me, so I will simple ask and wait for list to answer...
> How do you increase to a counter without refreshing the whole page. For
> example if you check site www.gmail.com under "Don't throw anything away."
> Heading there is counter which is increasing,
>  And other example is www.neopets.com where time (seconds) is changing
> without refreshing the whole page.

> Any link or hint or code will be welcome ( even comments ) ;)
> Thanks in advance.
> salim
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript

Este correo electrónico puede contener información confidencial y/o
privilegiada, pero también puede ser que contenga una parida. Si usted
no es el destinatario arriba mencionado del mensaje (o ha recibido
este correo electrónico por error) por favor notifíquelo
inmediatamente al remitente y destruya este e-mail así como todo el
contenido de su disco duro. Cualquier copia no autorizada, divulgación
o distribución del material incluido en este correo electrónico queda
estrictamente prohibida, o no.

This e-mail may contain guachu guachu guachu

More information about the Javascript mailing list