Re: Closing my Window after Download
| From: | PHP Junkie | Date: | Tue, 24 Aug 2004 17:57:42 +0000 |
| Subject: | Re: Closing my Window after Download | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194607@lists.php.net to get a copy of this message | ||
Ave,
The browser window which launched the Save As window...
On 8/24/04 1:41 PM, "John Nichel" <john@kegworks.com> wrote:
> PHP Junkie wrote:
>> Ave,
>>
>> I use the PHP Header directives to create a page which would force-download
>> the file for the user...
>>
>> <?php
>> $file = "$P/$F";
>> header("Content-Description: File Transfer");
>> header("Content-Type: application/force-download");
>> header("Content-Disposition: attachment; filename=".basename($file));
>> @readfile($file);
>> ?>
>>
>> What I want is to have this window close automatically once it's launched
>> the Save As Dialog Box ... I tried several javascript window.close(),
>> self.close() functions but none of them seem to work. The window wont close.
>> It remains open.
>
> You wish to close which window? The "Save As" window, or the browser
> window which launched the "Save As" window?
>