Screen javascript variable to local variable

Hi ,

In container onclick, I have called the function which is defined in the screen javascript editor in traditional web app.

Is it possible to pass the output of the screen javascript to the local variable?


Hello,

Usually, we use a hidden input (placed in the OutSystems side) associated with a variable, and when we want to pass the value from JavaScript, we use JavaScript to set the input value. 

When submitting, the variable in OutSystems will have the value.

Cheers.

Hello,

Eduardo Jauch absolute right as usual!)

A bit more in detail, set hidden style for input and give name to it. Then use in your JS following statement: document.getElementById('"+Input.Id+"').value =YourValue.

If vice versa use the OutSystems variable in JS, then: var JSVar = '" + OutsystemsVar + "'.

Good luck!