I am trying to detect when the PDF file is returned from the .php file that is generating it. Obviously when the download link appears then it is returned. However, I would like to implement a loading screen while the pdf file is being create.
Below I have the function that runs the .php file that generates the pdf.
Thank you!
function popupClick2 (){
var popupObj2 = {};
var c = '0';
var p = '0';
var i = '0';
document.location.href = 'popupAjax2.php?yearPop='+$('#year').val()
+'&rangeD='+$('#rangeD').val()
+'&checkboxI='+i
+'&checkboxP='+p
+'&checkboxC='+c
+'&type='+$('#pdfcsv').val();
closePopup2();
}