kim
kim

Reputation: 143

value of a datalist associated to input in html

I have got a datalist associated to an input in html.

<td><label class="details" for="managerLadelId" id="managerLadelId">nom du hiérarchique</label></td>
<!--td><input class="details" type="text" id="detailledManagerDataLabelId" name="firstNameTFName"  ></td-->
<td><input class="details" type="text" id="detailledManagerDataLabelId" list="managerList" 
    data-toggle="tooltip" data-placement="right" title="nom prenom,matricule" />
    <datalist id="managerList" >
<option th:each="employee:${employees}" th:text="${employee.lastName}+' '+${employee.firstName}+','+${employee.id}"></option>
    </datalist>
</td>

I want to know the value. if I get the input element ".value". it is empty. I don't manage to get directly the datalist element with his id but if I get the input.list I can explore it with debugger but I do not find the value I want. Can someone tell me where it is?

Upvotes: 0

Views: 80

Answers (1)

kim
kim

Reputation: 143

A mistake from me. The element was defined twice and I was modifying the second element. sorry

Upvotes: 1

Related Questions