I want to use setInterval function for a repeated task. Here is my autoUpdate function which works one time.
var intervalId;
function autoUpdate() {
intervalId = setInterval(updateFile(fileId, 'root', document.getElementById('editor').value), 10000);
}
Here is my stopAutoUpdate function.
function stopAutoUpdate() {
clearInterval(intervalId);
}
What is wrong with this code? Thanx.
Edit= I have the title edited. Sorry.