Lots of things you could do...how complex do you want to get?
You could always go back to using the popup and close; just make sure the close comes after the call to create the popup.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.