Please refer to the following FAQ:
http://www.htmlhelp.com/faq/html/media.html#force-download
>>>
5.4. How do I force the browser to download a file?
You can't, because the Web doesn't work that way.
As explained in the answer to the previous question, the server is responsible for identifying a document's media type properly, and the browser is responsible for deciding how to handle the document (based on its media type). There is no way for a web author to override the way the browser is configured to handle any given type of file.
Most browsers allow the user to download to disk if they want to. If the file must be saved to disk, if there is absolutely NO other way to handle it, the MIME type should be "application/octet-stream".
<<<
So, if it is absolutely imperative that you open a download window, I would try setting the content-type to "application/octet-stream", then sending the data in a binary format. Results may be mixed, though.
Good luck.
Jay Eckles
www.jayeckles.com