How do I detect which button was clicked on "save/open/cancel" dialog?
<p>I got a webpage where members can download different kind of files on. I wan't to get information about which files and how many times each member have downloaded. when the user want to download a file he get browser pop-up where he gets 3 choises: "Open", "save" and "Cancel".(file dialog box in browser). i want to update the download status only if open/save button is clicked</p>

<p>Is  there a way to detect which button was clicked on "save/open/cancel" dialog?</p>
