开发者

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 w开发者_Go百科ay to detect which button was clicked on "save/open/cancel" dialog?


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.


There is no way to know which button was clicked.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜