skip to Main Content

Jquery AJAX DELETE request is also triggering a POST request on the same form

I have a form wrapped around a table <form id="project-form"> <table id="project-table" class="table table-striped table-inverse table-responsive"> <caption>Projects</caption> <thead class="thead-inverse"> <tr> <th scope="col">#</th> <th scope="col">Project name</th> <th scope="col">Description</th> <th scope="col">Estimated time (min)</th> <th scope="col">Actual time (min)</th> <th scope="col">Add task</th> <th scope="col">Delete…

VIEW QUESTION

Ajax form Submit vizualizing the php file – Jquery ajax

This is the js <script> $(document).ready(function() { $("#create-admin").submit(function(e) { var forms = document.getElementsByClassName('needs-validation'); if(forms == null) { $.ajax({ type: "POST", url: "crud_admin.php", dataType: "html", data: $("#create-admin").serialize() }).done(function(data){ toastr.success(data, 'Success Alert', {timeOut: 5000}); }) } /**/ }) }) this is the…

VIEW QUESTION
Back To Top
Search