How to detect OverlayTrigger dialog was close?

I've face with a problem that when user click on an OverlayTrigger link, it's open a dialog, when user submit the dialog, in the Controller, I just response a message. So how to know that we receive that message? My purpose is when I know the operation is done, I'll execute some function in js.