Addendum (sorry, there's no 'edit' functionality):
The above runs OK, but when I add an Ajax call, the loop may take longer to complete than the interval. So the timer fires again before it's complete.
I HAVE resolved one aspect of that. Rather than setInterval, I simply wait until the Ajax...