I have code to download excel file:
$("#downloadReportingTask").empty();
        $("#downloadReportingTask").html('Processing...');
        download = '<?php echo $this->baseurl; ?>/reporting/downloadTask' +
                '?taskGroupId=' + $('select[name="taskGroupId"] option:selected').val() +
                '&status=' + $('#filterStatus').val() +
                '&startDate=' + $('#startDate').val() +
                '&endDate=' + $('#endDate').val() +
                '&userId=' + $('#userIdList').val();
       window.location = download;
This is the result:
 
I want to check downloading file is completed or no. I tried on window.close:
if (window.close) { 
           $("#downloadReportingTask").empty();
           $("#downloadReportingTask").append('<i class="ace-icon fa fa-download"></i> Export To Excel');
       }
But window.close didn't work. Maybe there's some code to check file is downloaded or no. Help me please. Thanks
