How to redraw an interactive window?

I have a question, I receive a message that has a button, I click it and an interactive window appears, then I click submit and the window closes, I can somehow make the window not close, but redraw the contents, if this is not possible so that when closed, a new window instantly opens.