If you have a server-side form that needs to post back to itself, and that form is in a window made available through window.showModalDialog call, the postback will cause a new, blank window to be shown.
The best way to solve this problem is to include the following tag in the <head/> section of your HTML source:
<base target="_self"/>