1987
Views
5
Comments
How to get id value
Question

Hi


How to get value using id in javascript.


Thanks in advance

2024-06-19 07-19-32
JitendraYadav

Hi,


SyntaxEditor Code Snippet

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


Thanks

2021-04-28 11-18-06
Vitheya sudesan

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;   


2022-02-07 08-52-30
Pranav Pandey

Hi Shaheen sara,

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

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

2021-04-09 11-42-43
assif_tiger
 
MVP

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


2020-10-13 05-30-54
Joeyy

This really helped me! I didn't know I could pass the ID directly to the input parameter from the widget's name.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.