Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

387
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda