How to get id value

Hi


How to get value using id in javascript.


Thanks in advance

Hi,


SyntaxEditor Code Snippet

 var element = document.getElementById("wtinpSelectedColNum");   


Thanks

JitendraYadav wrote:

Hi,


SyntaxEditor Code Snippet

 var element = document.getElementById("wtinpSelectedColNum");   


Thanks

Hi,

    Code snippet in mobile application, pass the id as input parameter in js then assign (id)

 var element = document.getElementById("id").value;   


Hi Shaheen sara,

You can also use jquery to get the value from Id .

var value=$("#Id").val();

Shaheen sara wrote:

Hi


How to get value using id in javascript.


Thanks in advance

Hi,

If you want to add a particular JS on any Widget in Outsystem, follow below steps:

Let's consider you have a button name as "SaveBtn" & Action as  "PostAnswer" where you are using JS in Action.

1- Drag a button & declare name- SaveBtn & id=mySaveBtn.

2- Declare an Action with input variable as inputSaveBtnID

3- Use the inputSaveBtnID in JS via same input variable terminology

4- connect the Action to Button & It ill demand for the inputSaveBtnID, Now pass Button ID to it as SaveBtn.id


Cheers