I want to transfer one variable from div to another, try JavaScript since i can't use th:href because is not activating since the tag have JS execution and is not open href link. I need to pass the variable some way with java script
I have this table I need y.id to be passed like variable in post request in another div
HTML CODE
<tbody>
<tr th:each="y : ${designationsList}">
<td th:text="${y.name}"></td>
<td th:text="${y.department.name}"></td>
<td class="text-right">
<div class="dropdown dropdown-action">
<a href="#" class="action-icon dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="material-icons">more_vert</i></a>
<div class="dropdown-menu dropdown-menu-right" >
<a class="dropdown-item btn" data-toggle="modal" data-target="#edit_designation"><i class="fa fa-pencil m-r-5"></i> Edit</a> <!-- h:href="@{/designations/update/i.id" custom:linkMethod="post" -->
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#delete_designation"><i class="fa fa-trash-o m-r-5"></i> Delete</a>
<a > </a>
</div>
</div>
</td>
</tr>
Need to pass it here
<form th:action="@{/designations/update/{id}(id=${y.id})}" th:object="${designationToUpdate}" th:method="post">