I have a problem because this function is for remove a record when I click on a button. But When I click there is 5 second of nothing and after I have this error on my server logs :
Uncaught RangeError: Maximum call stack size exceeded
at Pt (jquery-3.7.1.min.js:2:70953)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
at Pt (jquery-3.7.1.min.js:2:71141)
Here is my code.
// Gestion de la suppression d'un enregistrement
$('body').on('click', '#deleteRecord', function() {
$.ajax({
url: "../../js/ajax/deleteRecord.ajax.php",
method: 'POST',
data: {id : id, table : table},
})
.done(function(response) {
Swal.fire({
title: $('#success').val(),
text: $('#delete_success').val(),
}).then((result) => {
window.location.href='app/admin/listes/' + table + 's.php';
});
});
});
Someone can help me ?
Stagiaire Yansys is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.