Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

386
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda