Hi there.
I was wondering if it is possible to Automatically close the current window with PHP. My idea is this...
header("location: FILE");
[SCRIPT TO CLOSE WINDOW]
Because the code will be used on a popup window. and when it starts the Header file, it will close the popup. with me?
The script should work like this:
window.close()'
Or, I would be even happier with something that works like a double header. It redirects to 2 urls at once. The download file, and the thank you page.
Thanks in advance







pr0gr4mm3r posted this at 17:00—12th January 2008.
He has: 544 posts
Joined: Sep 2006
You can't make changes to the browser properties (window size, popup, close) with PHP because PHP is a server-side script. You will have to do it using JavaScript. All you have to do is echo (or print) that JavaScript statement you have in your post.
Hey! It compiles! Ship it!
Reece S posted this at 20:02—12th January 2008.
He has: 169 posts
Joined: Oct 2007
yes, I thought that. I have had to use javascript like you said. I used 2 functions, both opened by a single hyperlink.
Cheers Programmer.