Changeset f1ec144 in prototipo_portal_2018 for prototipo/static/js/functions/CheckSign/CheckSignPDF.js
- Timestamp:
- Nov 7, 2017, 3:00:36 PM (7 years ago)
- Branches:
- master
- Children:
- 025e022
- Parents:
- 68a964b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prototipo/static/js/functions/CheckSign/CheckSignPDF.js
r68a964b rf1ec144 1 2 3 4 5 6 // Primer paso (Subir el documento al servidor) 7 function VerificarDocumentServer(formDat){ 8 $.ajax({ 9 url: "https://murachi.cenditel.gob.ve/Murachi/0.1/archivos/firmados", 10 type: "post", 11 dataType: "json", 12 data: formDat, 13 cache: false, 14 contentType: false, 15 processData: false, 16 xhrFields: {withCredentials: true}, 17 headers: {"Authorization":"Basic YWRtaW46YWRtaW4="}, 18 success: function(response) { 19 20 INFO_CHECK = SerealizeMyJson(response); 21 22 CONT_VERIFIC += 1; 23 if (CONT_VERIFIC == 1){ 24 INFO_DATATABLE_VERIFICAR = DataTableVerificar(response); 25 } 26 if (CONT_VERIFIC > 1){ 27 INFO_DATATABLE_VERIFICAR.destroy(); 28 INFO_DATATABLE_VERIFICAR = DataTableVerificar(response); 29 } 30 31 32 }, 33 error: function(response) { 34 //Que se ejecuta cuando finalice la petición de con error 35 $("#respuesta").html('Error, al subir el archivo al servidor...!!!'); 36 alert("ocurrio un error, al subir el archivo al servidor") 37 } 38 }); 39 40 } 41 42 43 44 45 $("#Form-check-pdf").on('submit', function() { 46 event.preventDefault(); 47 48 var formDat = new FormData(); 49 formDat.append("upload", $("#file-check-sign-pdf")[0].files[0]); 50 51 VerificarDocumentServer(formDat); 52 53 }); 54 55 56 57 $("#button_CheckSingPDF").on('click', function() { 58 $("#file-check-sign-pdf").trigger('click'); 59 }); 60 61 62 63 $("#file-check-sign-pdf").on('change', function() { 64 $('#check_sign').show(); 65 });
Note: See TracChangeset
for help on using the changeset viewer.