i believe this is the easiest way to do so:

make a page that generates the file you want just like you would do with ajax (unless this is a fixed file which makes it even easier) and simply set a button with javascript code: "window.open(lo cation);"
and it will download the file!

if you need to send information through a post method then you should tell the ajax element to generate the file and when...