Ave,

Oh My Gosh! You did it!! Gosh! I can't believe you solved it.
And well, I don't know when this was "explained" to everyone but if you
actually search the internet and try and lookup what I was trying to do,
you'll find, as I found, a lot, and I mean a "LOT" of people with the exact
same problem... Because everybody tries to window.open() the page with the
force-download script. Yes your logic made sense to me as soon as I read it,
and I had no doubts it will work. I almost said to myself "how dumb could I
be" because it was such a simple logical issue. But unfortunately, trust me,
it has NOT been explained to "everyone". I even came across people who are
using frames and some kind of JS to close to open window. I couldn't use
that solution so I passed it.

But anyhow, thanks a ton, I needed this real bad and now that I got it I
feel stupid that I didn't make this sense myself. But then again, once in a
while you need a hit on the head with a mallet just like this.

Thank you so much.

PHPJunkie.


On 9/1/04 8:52 AM, "John Holmes" <[EMAIL PROTECTED]> wrote:

> From: "PHP Junkie" <[EMAIL PROTECTED]>
> 
>> Which page do you give this code in?
>> For example, I have a page admin.php .... Therein is the link on which,
>> when
>> a user clicks, a window "admin_dl.php" opens. The "admin_dl.php" contains
>> my
>> force-download code and it is that window that I'm trying to close.
>> 
>> If I specify this following code in admin.php itself, would it work?
>> Admin.php does contain a lot of other stuff too.
> 
> Are we still on this topic?
> 
> Say for example you request example.org/music.mp3. The file downloads to
> your computer, right? How is a request for a download of an MP3 file going
> to close your browser window? Your request for "admin_dl.php" is no
> different than a direct request for an MP3 file. You can't send a file and
> then expect to execute some HTML/JS or redirect to another page.
> 
> Why are you opening another window, anyhow? Just link to admin_dl.php from
> admin.php. When a user clicks on the link, it'll trigger a download and the
> user will never leave admin.php. When you click on a link to an MP3, the web
> page your on doesn't change, does it?
> 
> I thought this was already explained to everyone? If anyone thinks I'm
> wrong, I'm more than happy to admit it; just show me  how.
> 
> ---John Holmes...
> 
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to