Closing a opened window after file download?
On a new site I'm working on for the company here at work, I'm opening a new 100x100 window with a url to my php script which saves the pdf file to the visitor's hard drive rather than viewing it in their browser. Once the window is opened, a save file dialog box pops up and they can save the pdf file to their hard drive. As soon as they close the save file dialog by saving the file or cancelling, I want the small window to close. Can you guys help me out with this?
Any help would be greatly appreciated! Thanks!
my_window = window.open("pdfdownload.php?file=<?php echo $HTTP_POST_VARS['file_to_add']?>", "my_window", "width=100 height=100");
window.location.href = "index.php?action=product_detail&itu=<?php echo $HTTP_POST_VARS['bid']?>";
The file is being opened in a new window.