I need to call a function that updates some JS objects on the page every 2 minutes.
How would I do that?
I created a onload function and a countdown function that refreshes a whole page and therefore resets the timer until next page refresh, but this is not the way I want it. Is there a way to keep an infinite time loop?
I assume, if I could create a an infinite loop and do something like this:
if (currentSeconds%120==0){
callFunction();
}
read https://developer.mozilla.org/en-US/docs/DOM/window.setInterval and https://developer.mozilla.org/en-US/docs/DOM/window.setTimeout