1

I am making a module in which when a user clicks on download button then a ajax request is send and some data is being send back after the call is complete . But how to write that data into a html file and automatically save it on client side ? . Is this possible via jquery ? as i am using $.ajax to get the data which i need to write in a html file and auto download that file on client side .

user1001176
  • 1,156
  • 3
  • 15
  • 36
  • 1
    Here's a link that could get you what you want: http://stackoverflow.com/questions/19327749/javascript-blob-filename-without-link – NoLifeKing Jul 01 '14 at 08:50

1 Answers1

0

You can not write a file at javascript or client side But,in html5 you can Please find this link here

http://www.html5rocks.com/en/tutorials/file/filesystem/

Can I write files with HTML5/JS?

Community
  • 1
  • 1
Just code
  • 13,553
  • 10
  • 51
  • 93
  • You can use HTML5's Javascript `Blob`-class, to create files client side, and then download them. As described in my comment on OP's thread. – NoLifeKing Jul 01 '14 at 08:54
  • as @NoLifeKing pointed out it's now possible with HTML5 features. Of course it's not really cross-browser yet – Su4p Jul 01 '14 at 08:54