I have the following Ajax / Jquery to delete a record according to the action of a href.
<script type="text/javascript">
function apagarRegistro(idTel) {
var baseurl = '<?php echo $sig_url;?>';
$.ajax ({
url: baseurl+"/sistel/index/apagar?idRegistro="+idTel,
type:'POST',
success:function(res){
if (res != 'success') {
alert("Registro apagado com sucesso.");
history.go(0);
}
}
});
}
</script>
The problem I am having is that after I make a query on the first page (of pagination) when I click on delete the file and it is done successfully, I want to be given the refresh on the page however it presents the message to confirm as print there:
What would be the solution to this?