Close window on redirect

I have a form in the Dhmtlx window. On submit (post), if all goes well, I do a redirect. Redirect page shows up in the window itself. I want, on redirect, the window closes and the redirect happens on main browser window. Any way to accomplish it?

Probably you are loading the page into an iframe using attachURL method. You may try to define _parent as form target. In this case the form will be submitted to the parent window.