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 

The last reply in the post that Benjith shared  https://www.outsystems.com/profile/175605/ should solve your problem.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi 

The last reply in the post that Benjith shared  https://www.outsystems.com/profile/175605/ should solve your problem.

Regards,

Daniel

 

Hi, 

It worked for me.

Thank you.