Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .preventDefault();
- var formData= new FormData($("#asi")[0]);
- formData.append("case",'ins_asig');
- $.ajax({
- url: 'inserts.php',
- type: 'POST',
- data: formData,
- cache: false,
- contentType: false,
- processData: false,
- beforeSend: function(){
- $('.btn').val("GUARDANDO INFORMACIÓN ....")
- },
- error: function(){
- swal("ERROR","Ocurrió un error al Guardar la Información","error");
- },
- success: function(data){
- if(data.length == 0)
- {
- swal({title: 'Éxito',text: 'Infomación almacenada correctamente',type: 'success'},function()
- {window.location="cat_inventario.php";});
- }
- else
- {
- swal("ERROR","Ocurrió un error al Guardar la Información"+data,"error");
- }
Add Comment
Please, Sign In to add comment