Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#save").on('submit',(function(e) {
- e.preventDefault();
- var formString = new FormData($("#preview")[0]);
- //Aqui necesito cambiar el estatus dependiendo de cual boton se dio click
- formString.append('status', 'IP');
- $("#save").prop('disabled', false);
- $("#make").prop('disabled', false);
- $.ajax({
- url: "<?php echo URL ?>"+"items/emp_make",
- type: "POST",
- data: formString,
- contentType: false,
- cache: false,
- processData: false,
- dataType: 'json',
- success: function(data){
- $("#save").prop('disabled', false);
- $("#make").prop('disabled', false);
- if (data.status == true) {
- swal({
- position: 'top-end',
- type: 'success',
- title: data.msn,
- showConfirmButton: false,
- timer: 1500,
- customClass: 'content-header-center'
- });
- setTimeout(function(){
- window.location.replace("<?php echo URL ?>ver/"+data.id);
- }, 1900);
- }
- },
- error: function(data){
- console.log(data)
- console.error('error');
- }
- });
- }));
Add Comment
Please, Sign In to add comment