Guest User

Untitled

a guest
Dec 12th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. .preventDefault();
  2. var formData= new FormData($("#asi")[0]);
  3. formData.append("case",'ins_asig');
  4. $.ajax({
  5. url: 'inserts.php',
  6. type: 'POST',
  7. data: formData,
  8. cache: false,
  9. contentType: false,
  10. processData: false,
  11. beforeSend: function(){
  12. $('.btn').val("GUARDANDO INFORMACIÓN ....")
  13. },
  14. error: function(){
  15. swal("ERROR","Ocurrió un error al Guardar la Información","error");
  16. },
  17. success: function(data){
  18. if(data.length == 0)
  19. {
  20.  
  21. swal({title: 'Éxito',text: 'Infomación almacenada correctamente',type: 'success'},function()
  22. {window.location="cat_inventario.php";});
  23. }
  24. else
  25. {
  26. swal("ERROR","Ocurrió un error al Guardar la Información"+data,"error");
  27. }
Add Comment
Please, Sign In to add comment