Current Path : /data/web/virtuals/51568/virtual/www/subdom/vypisy/php/ |
Current File : /data/web/virtuals/51568/virtual/www/subdom/vypisy/php/BakalariTridyPohybyNacti.js |
$("#btnNactiTriduPohyby").click(function(event) { event.preventDefault(); let formData = new FormData(), idobdobi = $("#rowObdobi").data("obdobi"), pocetsouboru = document.getElementById('vypisCSV').files.length; for (let i = 0; i < pocetsouboru; i++) { formData.append("fileCSV[]", document.getElementById('vypisCSV').files[i]); } alert(formData); formData.append("idobdobi", idobdobi); $("#rowInputCSV").addClass("d-none"); $("#rowNacitamPohyby").removeClass('d-none'); $.ajax({ url: "php/TridaPohybyNacti.php", type: "POST", data: formData, contentType: false, cache: false, processData: false, success: function(result) { let data = JSON.parse(result); if (data.ok) { $("#obdobiBody").html(data.obdobi); $("#tridyBody").html(data.detailTridy); } $("#rowInputCSV").removeClass("d-none"); $("#rowNacitamPohyby").addClass('d-none'); $("#rowBtnNactiTriduPohyby").addClass('d-none'); } }); })