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 .
Asked
Active
Viewed 91 times
1

user1001176
- 1,156
- 3
- 15
- 36
-
1Here'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 Answers
0
You can not write a file at javascript or client side But,in html5 you can Please find this link here
-
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