开发者

In javascript, how can I detect when the browser brings up the open/save/cancel prompt when loading a file?

In javascript, how can I detect when the browser brings up the open/save/cancel prompt when loading a file?

If possible, is it the same for all browsers?

I'm trying to fix a problem with user开发者_C百科s clicking a download button, being impatient and clicking it again, and again which is taxing our servers. I tried just hiding the button while the file is processed, but the icon will come back before the open/save/cancel prompt shows up.

The code goes something like this: ... users clicks button, button hides, external process gets the file, button appears ...


You can't.

How the browser deals with a requested resource - open it, start an external application, offer a "save" dialog - is outside of what you can control using JavaScript.


You can't! No way, that's it!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜