Friday, February 16, 2018

How to use loading image while downloading file like csv,xls ? [SOLVED]

Hey Guys,

Please follow the below step to download using ajax request in PHP and loader show while fetching and download the file .



//Total  members Registered in a month   
jQuery('#total-members-month-report').click(function(event){  
jQuery('.overlay').show();
var buildername = $('#builder-name').val();
var date1 = jQuery('#date1').val();
var date2 = jQuery('#date2').val();   
var URL = component_path+'&task=universityreport.registeredMembers&buildername='+buildername+'&date1='+date1+'&date2='+date2;
jQuery.ajax({url: URL, success: function(result){
        setTimeout(function(){ 
  window.location.href = URL;
  jQuery('.overlay').hide();
  }, 1000);
    }});
});

Hope it will help you!!

2 comments:

  1. CCTV Installation is belongs to E-sync security solutions.Our primary focus is to be installing cctv cameras and quality and cost effective.There are expected to design your system as per your requirement to the customer feel comfort and secure.We have providing a high quality professional service to the customer.

    CCTV Service in OMR

    ReplyDelete