How do I execute some javascript after a file is downloaded?

前端 未结 3 2039
半阙折子戏
半阙折子戏 2020-12-21 23:29

I have a page with a link to a file. When the link is clicked I use the code below to show a loading message:

$(\'#TerritoriesToExcelLink\').click(function()         


        
3条回答
  •  执笔经年
    2020-12-21 23:59

    Have your server send a random cookie that you specify from your client-side code with your download in the HTTP headers. Poll in your Javascript to check for the presence of the cookie. This should tell you when the browser has your file.

提交回复
热议问题