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