31 lines
801 B
JavaScript
Executable File
31 lines
801 B
JavaScript
Executable File
function DeleteDev(id){
|
|
|
|
var message = "Realmente deseas eliminar esta devolucion?";
|
|
|
|
if(!confirm(message)){
|
|
return;
|
|
}
|
|
|
|
new Ajax.Request(WEB_ROOT+'/ajax/devoluciones-cedis.php',{
|
|
method:'post',
|
|
parameters: {type:"deleteDev", devCedisId:id},
|
|
onLoading: function(){
|
|
$("productos").innerHTML = LOADER;
|
|
},
|
|
onSuccess: function(transport){
|
|
var response = transport.responseText || "no response text";
|
|
var splitResponse = response.split("[#]");
|
|
|
|
if(splitResponse[0] == "ok"){
|
|
ShowStatus(splitResponse[1]);
|
|
$('contenido').innerHTML = splitResponse[2];
|
|
HideFview();
|
|
}else{
|
|
ShowStatusPopUp(splitResponse[1]);
|
|
}
|
|
|
|
},
|
|
onFailure: function(){ alert('Something went wrong...') }
|
|
});
|
|
|
|
}//DeleteDev
|