RE: Need simple delay loop
by Jeremy Duncanson <aesic(at)softhome.net>
|
Date: |
Fri, 16 Aug 2002 20:41:27 -0500 |
To: |
hwg-techniques(at)hwg.org |
References: |
yaffle |
|
todo: View
Thread,
Original
|
|
At 4:49 PM -0400 on 8/16/02, John Woram wrote:
> Timothy Booker wrote: "window.setTimeout() and window.setInterval()
> are the usual ways of timing things in Javascript."
>
> Right -- my problem is I can't get either to work as expected.
> Actually, I was using the document.write(k) function because I thought
> it would be a reasonably-easy way to watch the effects of various
> delay techniques. Maybe I need to pick a different test method.
Using setTimeout doesn't work because you've just overwritten your source
with document.write. However, you could use frames and write into a
different one with your script. Alternatively, you could use a textbox to
display your numbers. Netscape has an example clock that updates every
second within their javascript documentation or tutorials.
Jeremy Duncanson
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA