Problems refreshing my datatable information
Problems refreshing my datatable information
Greetings people, I'm developing a little school project and I have a real annoying problem with my table when I perform my edit function or delete wich I call through a button with ajax, I am using a modal in order to edit the user information so by the time I push the edit button it refreshes the new information but whitout pagination what can I do?, I must say that I'm not very good at web developing so I'll really apreciate any help you can give me.
This is the function where I fill my modal with the information I get with a previos function json
function editar(Id_Emp){
$('#formulario')[0].reset();
var url = 'edita.php';
$.ajax({
type:'POST',
url:url,
data:'Id_Emp='+Id_Emp,
success: function(valores){
var datos = eval(valores);
$('#edi').show();
$('#idemp').val(Id_Emp);
$('#op').val('Edicion');
$('#adming').val(datos[0]);
$('#admin').val(datos[1]);
$('#inm').val(datos[2]);
$('#noemp').val(datos[3]);
$('#rfc').val(datos[4]);
$('#rfc13').val(datos[5]);
$('#curp').val(datos[6]);
$('#nom').val(datos[7]);
$('#puesto').val(datos[8]);
$('#vigencia').val(datos[9]);
$('#vigente').val(datos[10]);
$('#cent').val(datos[11]);
$('#seiz').val(datos[12]);
$('#exp').val(datos[13]);
$('#edita-emp').modal({
show:true,
backdrop:'static'
});
return false;
}
});
return false;
}
And this is the other function to update my database info where lies my problem
function modificar(){
var url = 'modifica.php';
$.ajax({
type:'POST',
url:url,
data:$('#formulario').serialize(),
success: function(registro){
if ($('#op').val() == 'Edicion'){
$('#mensaje').addClass('bien').html('Edicion completada con exito').show(200).delay(2500).hide(200);
$('#agregaemp').html(registro);
return false;
}
}
});
return false;
}