deepu
deepu

Reputation: 2029

How do I detect which button was clicked on "save/open/cancel" dialog?

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

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

Upvotes: 2

Views: 1376

Answers (3)

CodesInChaos
CodesInChaos

Reputation: 108810

You can't know that. Some browsers even start the download before the user decides what to do with the file. But perhaps you can get your webserver to log if the download has been completed. That's probably the most reliable result you can get.

Upvotes: 3

Sachin Shanbhag
Sachin Shanbhag

Reputation: 55489

I dont think you can. The site just streams the file to the browser. What the user does with the file is not known by the website as there is no more server side interaction.

Upvotes: 0

Lazarus
Lazarus

Reputation: 43084

There is no way to know which button was clicked.

Upvotes: 0

Related Questions