190
Views
2
Comments
Solved
Getting the textbox value
Question

Getitng the textbox value through TextBox's name property, I am using the below code but it is always giving me "undefined" value. In outsystems I don't think you can set the ID property as I can't see it in the properties section of the text box


SyntaxEditor Code Snippet

"alert(document.getElementsByName('Contact_Name').value);"
2023-12-07 07-51-40
Remco Dekkinga
 
MVP
Solution

Hi Sandeep,

That is correct. The ID's in outsystems are generated automatically, based on the name of the element and the names of it's parents. 

You can use something like "document.getElementById('"+Contact_Name.Id+"').value"

Kind regards,

Remco

UserImage.jpg
Sandeep Kapil

Brilliant, worked like a charm :-), cheers mate.

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