Dynamically generating a file with javascript?

Posted by gct on Stack Overflow See other posts from Stack Overflow or by gct
Published on 2010-03-16T15:43:57Z Indexed on 2010/03/16 15:51 UTC
Read the original article Hit count: 210

Filed under:
|

I'm working on a web app for my company that will let us do some image tagging stuff, and I'd like to be able to generates results in the form of a CSV file. I can do this easily enough by dumping the CSV data to a div or something on the page and having the user copy it out. I'd rather have them hit the a generate button and have a CSV file downloaded as though they clicked on a link to the result, so they can more easily just save the file somewhere convenient.

Is it possible to simulate this kind of thing with javascript? I basically want to dynamically generate the file and then let them download it, client side.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about csv