Re: Closing my Window after Download

From: Date: Tue, 31 Aug 2004 23:12:45 +0000
Subject: Re: Closing my Window after Download
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195353@lists.php.net to get a copy of this message
On Tue, 31 Aug 2004 16:56:18 -0400, PHP Junkie <phpjunkie@mjimm.com> wrote: > Indeed, it didn't work. Anymore suggestions? I've got a couple of ideas, but I really think you're making life too hard for yourself. You might want to rethink what you're trying to do rather than creating a clunky solution. Anyways, on with my ideas... * Send the file as the first part of a multipart response. The second part would be an HTML page which uses Javascript to close the window. I have no idea if this would work. * I'm guessing the window you want to close was created by the main window. If this is the case you could use Javascript to start the file downloading in the main window from the popup and then close the popup. e.g. opener.location.href = 'thedownload.file'; window.close();. This should work. -- Stut

« previous php.general (#195353) next »