I am using a Servlet program to download files.When i am calling that servlet the FILE DOWNLOAD dialog is displayed.I want to capture that event whether the user pressed the 'OK' button or 'Cancel' button on the FILE DOWNLOAD dialog.Based on the event i have to write my own code.Please help me to do this with sample code.