Thanks Steve,

I am actually interested in the first part of your answer. The use of ajax to get the contents of the response.

The response, in this case, "Report printed successfully: abcd.txt" comes as the body of the popup window.

Meaning I somehow have to access that window and read the content. Extracting the filename string is easy, dont worry about that