You may find help quicker on this by asking it in a JavaScript forum since this has nothing to do with PHP. The JS functino window.close() is part of your answer, but if you want data from your new window to go back to the original window, sorry, I can't help you there.