Hide custom message when downloading ends

Hide custom message when downloading ends

Hello.

First, excuse me if this issue or similar has been posted here.

Well, in my web application, when an icon throws a file download, I show a <div...> with "downloading..." message, and then I submit the form.

In my controller, I read the file and write its content in the HttpServletResponse object, that's been received by onSubmit event method.

Finally, the standard open/download/cancel dialog is shown, the answer is processed... but my "downloading..." message remains.

Can I process that response object in my view?
Can I catch the open/download/cancel dialog events?
How can I hide that <div...> when download ends?

Thanks in advance, best regards.