How Can I Execute A External Js From Html Every 10 Min?
I have a HMTL which execute a external JS. The JS returns my Google Calender events. I want my calender to be updated automatically every 10minutes. The HTML looks like:
Solution 3:
Well you can use
setInterval(function, delay)
delay is in milliseconds and function is the name of the function you want to call. Therefore, you need to wrap your content of js file within a function as
functioncallAgain()
{
var formatGoogleCalendar = (function() {
'use strict';
var config;
.
.
.
}
and then use the setInterval(callAgain, 5000)
in the script part of your html file
Post a Comment for "How Can I Execute A External Js From Html Every 10 Min?"