I made a print page to print tables from there. But when you delete something you will also need the refresh to page to apply the site. Here is my code
<a target="_blank" onclick=" asd()" href="<?= url('/delete?id=' . $row['product_id']) ?>" class="btn success">Delete</a>`
and my delete code is here
function asd() {
var a = confirm('Are you sure you want to delete this product');
if (a == 1) {
setTimeout(function() {
location.refresh();
}, 1000);
return 1;
} else {
return 0;
}
}
When i delete something page doesnt refresh after i click ok.