title: Call javascript function on download dialog display
body: <p>After I call the server to get a file, how can I call a javascript function when the dialog for download is shown?</p>
  
  <p>EDIT:
  My goal is to give the client a feedback when the file is being processed by the server, so events like onclick will not do.</p>