I have two questions for one problem.
  1. Is there any way to run a timer of X in X seconds instead of minutes??
  2. I have two functions in javascript onLoad () and OnUnload () which returns the time in seconds that the user this page, the problem is how to write it in a variable in Outsystems ... ??   in attach there is an example attached to see who can help me.

Best regards
 Daniel Maia
Hi Daniel,

In fact it is not possible to set the schedule of a timer to run every x seconds (as you know, the minimum period available in Service Center is 5 minutes). 
What you can do is, in the end of the timer execution, set the next time the timer will run (for x seconds after the current time). You can do that using the Timer Next_Run runtime property. Read the Timer Runtime Properties page in the Service Studio online help to know more about this.

Regarding your second question, the way to bind a javascript variable to an OutSystems variable is the following:
  1. Add an OutSystems input widget to the page and bind it to a screen variable;
  2. In the cliend-side javascript code that executes in the page, fill in the input widget value with the javascript value that you want to pass to the OutSystems variable (with something like document.getElementById('<the OutSystems Id>').value = value)
  3. Once your request is posted to the server, the OutSystems variable will have the value that was filled in by the javacript in the page.
I hope this information helps.

Best Regards,

Daniel Lourenço