Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- refreshing JavaScript?


rewboss - 9:39 am on Sep 11, 2002 (gmt 0)


An alternative is to leave out the setTimeout method in the function body, and change the onload handler to:

onload="setInterval('changeMySpan()', 10000);"

It's slightly more efficient than using setTimeout to recursively call a function. Well, not so's you'd notice, but it is a bit more elegant.


Thread source:: http://www.webmasterworld.com/javascript/189.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com