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

212
Visualizações
How to disable a delete button after it has been pressed?

I have small table which has the following code for the delete button. When I click on the delete button all the delete buttons in the row are disabled. I only want one button to be disabled corresponding to the appropriate value in the table. The rest of the buttons should stay enabled.

                <c:when
                    test="${(****) == 1 && ****}">
                    <display:column title="Delete" class="cell-text-centered">
                        <i class="btn-link glyphicon glyphicon-trash"
                            onclick="fn_delete('<%=urlDelete%>')"></i>
                    </display:column>
                </c:when>
                <c:otherwise>
                    <display:column title="Delete" style="width:5%"
                        class="cell-text-centered">
                        <i class="glyphicon glyphicon-trash"></i>
                    </display:column>
                </c:otherwise>
            </c:choose>

<script>
function fn_delete(url) {
    var deleteAnswer = confirm("Do you want to delete corresponding data?");
    if (deleteAnswer == true) {
        document.Form.action = url;
        document.Form.submit();
    }
}
</script>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

When you click on the button , you might get an event e available inside function scope. See if you could use the source of an event and add add an attribute called disabled to your html button element

about 4 years ago · Juan Pablo Isaza Relatório
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