Question: Now i have a problem below:

i've added a div on my page to forbid user to click buttons, links or fields when user click the DOWNLOAD button. So i need to remove this div when the IE file download prompt pops up or when user clicks "save", "save as" or "cancel" on it.

How can I reach this?

**IE only considered please.**

Answer: 
No, the browser file handling dialogs can't be detected from javascript - this is by design. Even if you limit yourself to IE, it is not possible, and other browsers handle file downloads in completely different ways anyway.

<http://groups.google.co.uk/group/comp.lang.javascript/browse_thread/thread/9441cce4f8fdf20b/6f4fcc7796e03f1d>

If you explain *why* you're trying to do this, there may be a different approach which suits you better.
I don't think there's a callback for that; definitely not in all browsers.

Also, not every browser pops up a prompt - and that depends on user-specific browser configuration; some may just start downloading in the background.

I'd suggest to remove the DIV after some interval (which you'll have to guess depending on the time it usually takes to show the download box), although it's not a very clean workaround.