I'm not even sure this is possible, but it came up in a recent project I was starting so I thought I'd ask around.

Essentially I'm wanting to use AJAX to dynamically bring in data to the user's browser and then hopefully at the end, present them with a download dialog (like you would normally see if the page had the file download hardcoded).

I know through JavaScript you can take binary file information from a file input and of course then send it off to a server via AJAX, but since I'm not planning on building the file on the server this makes it more difficult in having the browser realize there is a file available from the page long after the page has loaded. I guess the real problem is figuring out what to do with this data once it has been recieved. With raw image data you can simply place it as the src for an <img> tag and you get a nice image on your page via AJAX.

Any information on this subject would be greatly appreciated as I'm simple at a stand still.