Are you talking about webdirect? If so use Exit Application, and use the homeurl= parameter to redirect to a page that is set to close window on page load.
I also blogged about the homeurl parameter usage here:
Perform Script on Server ["Send eMail"]
Show Custom Dialog ["Request"; "Thank you for you submission."]