I want to have a hyperlink/button dat opens a file (say a PowerPoint file) and also closes the current browser window. This window is opened in dialog box style (no menubar/toolbar/statusbar)

I used the following code:

<a href="myPresentation.ppt" onclick="javascript:window.close()"><img src="go.gif"></a>

In IE this works fine. IE asks for confirmation (open or save), opens the .ppt file and closes the window. This doesn't seem to work in Netscape though: the window didn't close. This seem to happen due to the confirmation dialog. If i delay the window.close statement then the window did close, but only if the confirmation dialog is clicked away.

Have anyone come accross this? any solution?