Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

388
Views
How to use varible from one div to another ThymeLeaf with javascript

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">
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!