0

Possible Duplicate:
Save file Javascript with file name

In javascript I have some data in a variable that I would like to give to the user as a file. How could I go about doing this?

Duplicate of Save file Javascript with file name, sorry.

Community
  • 1
  • 1
Pieter Bos
  • 1,554
  • 1
  • 12
  • 20
  • As a file what do you mean by that ? Do you want your user to be able to download that text in a variable as a text file ?? – yogi Aug 11 '12 at 13:44
  • this may answer your question: http://stackoverflow.com/questions/7392117/how-to-create-save-a-txt-file-with-javascript-compatible-cross-browser – Mike Sav Aug 11 '12 at 13:51
  • 1
    I think this is close to what you want to do http://stackoverflow.com/questions/7717851/save-file-javascript-with-file-name – MimiEAM Aug 11 '12 at 13:52
  • @MimiEAM Brilliant. Exactly what I wanted. – Pieter Bos Aug 11 '12 at 14:02
  • @devundef I'm sorry, a lot of my questions are a bit poor, so there really are no answers. Thank you for pointing it out, though. – Pieter Bos Aug 11 '12 at 21:07

0 Answers0