17
Views
3
Comments
Solved
How to pass a variable out of a JavaScript function
Question
Application Type
Reactive
Service Studio Version
10.0.1110.0
Platform Version
11.10.2 (Build 25738)

Hello can help me with this isue??

I have to catch and pass to a var a javascript value  in my web, i create a input widget, in my javascript i wanna update this object, but this is not available 

is there any way to modify and update the value in the variable?

Thanks!!!


web.oml

Rank: #184
Solution

Hi Andy, 

try to use document.querySelector('.someClass').value = "Value you need"

eg: check the pics and oml, I add a Run Javascript Action from HTTPRequestHandler and add the script inside and add the class "inputTest" to be selected by the query Selector

Results:


Sometime use the getElementById is trick on traditional web, so I advice to do as I show in the pic

Hope I could help you

Best regards

Carlos Lessa

web.oml

Rank: #23793

Thanks for your help Carlos!

Rank: #184

Welcome, good luck with that