Hi,
I have a requirement in which user wants to autosave the form after particular interval of time. In order to achieve that I am running following javascript in ONReady event action.
var myVar = setInterval(myFunction, 10000);
function myFunction() {
document.getElementById("AutoSaveButton").click();
}
When user leaves the screen I am trying to use clearInterval() in OnDestroy event action to clear the setInterval but not sure how to approach it.
Thanks
Hi Nannu,
Refer the below mentioned Forum Post links:
https://www.outsystems.com/forums/discussion/59957/properly-ondestroy-javascript-function/#Post229803
https://www.outsystems.com/forums/discussion/20770/mobile-screen-refresh-on-timer/#Post81148
https://www.outsystems.com/forums/discussion/37440/how-to-refresh-the-screen-automatically-in-mobile-application/#Post231382
Hope this helps you!
Regards,
Benjith Sam
Hi
The last reply in the post that Benjith shared https://www.outsystems.com/profile/ms0h0s23ew/ should solve your problem.
Daniel
Daniël Kuhlmann wrote:
It worked for me.
Thank you.