Hello,
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?

I can't use any javascript code in the url that's opened in the small window because I use the php header() function and it would simply save that code with the pdf and the pdf and the code wouldn't work. So it looks like I'll have to use some code on the page that actually opens the window. Here's the existing javascript code on that page:

Code:
<script language="javascript">
<!--
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']?>";
//-->
</script>
The file is being opened in a new window.
Any help would be greatly appreciated! Thanks!