I want to display the message successfully deleting data with Sweetalert, and the beginning of the script:
<a href="delete.php?&id=<?php echo $r['id']; ?>" class="delete-link">Delete</a>
Javascript :
jQuery(document).ready(function($) {
$('.delete-link').on('click', function() {
var getLink = $(this).attr('href');
swal({
title: 'Alert',
text: 'Delete?',
html: true,
confirmButtonColor: '#d9534f',
showCancelButton: true,
}, function() {
window.location.href = getLink
});
return false;
});
});
the data has been successfully deleted, but the way you want to display the data message has been deleted like this, where is it put in?
swal("Success!", "Successfully Deleted Data!", "success");
Please help. Thanks.