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

220
Views
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 answers
Answer question

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 Report
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!