in project creating excel file , providing user downlod
header('content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
code. triggering file generating code $(location).attr('href','###'); code in js gives call file exporting page , after generating file download window appears. showing work in progress have displayed loader window when export button clicked before calling $(location) , closing window have used jquery cookie library (to actualy check when file generation completed , download window appears) have referred
detect when browser receives file download
url technique solves problem , can able check when progress completed , removed loader window.
now want show progress of file completion. ie. excel file generating 500 rows. takes time generation, have tried write progress in cookie 25% after 100 rows written, 50% after 200 rows written , tried check cookie value in js code
fileprogress = window.setinterval(function () { var cookievalue = $.cookie('fileprogresstoken'); alert(cookievalue) }, 1000);
but doesn't work, found php set cookie value after page progress completes (ie. when file generation process completes) , set value 100 , not able check progress after 1 second.
what shall achieve this, possible or simple alternative way
Comments
Post a Comment