Re: Closing my Window after Download

From: Date: Tue, 31 Aug 2004 18:09:30 +0000
Subject: Re: Closing my Window after Download
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-195316@lists.php.net to get a copy of this message
try this, after you force download of the file, use: header("Location: close_window_script.php"); where the only code in that file is something like this: <script language="javascript"> <!-- window.close(); //--> </script> this is a total workaround, but since its the only thing in the document, its very possible that it'll work, it won't take any more time to load either because you're using the header() function to forward, so the user has to download the same amount of info. -- -------------------------------------------------------------->> Jasper Howard :: Database Administration Velocity7 1.530.470.9292 http://www.Velocity7.com/ <<-------------------------------------------------------------- "Php Junkie" <phpjunkie@mjimm.com> wrote in message news:BD59E3C0.1D03%phpjunkie@mjimm.com... > Ave, > > I hear you... Even I feel it's a different problem but I don't know what. > My first thought was that HTML or anything doesn't work after the > Force-Download script in general.... But since you seem to use it, I guess > it does. > > Now I don't know what to do, how to make it work. I can't understand what > exactly is causing the problem. > > Thanks though. > > > > On 8/30/04 7:13 PM, "Jasper Howard" <jasper@velocity7.com> wrote: > > > if you're not getting any html after your php script, then there's a > > different problem. I do the same thing and all I use is: > > > > <?php > > ... > > ?> > > <script language="javascript"> > > <!-- > > window.close(); > > //--> > > </script> > > > > and I've never had a problem with it not closing... > >

« previous php.general (#195316) next »