Friday, November 16, 2012

Javascript: Create and save file

I have data that I want to write to a file, and open a file dialog for the user to choose where to save the file. It would be great if it worked in all browsers, but it has to work in Chrome. I want to do this all client-side.


Basically I want to know what to put in this function:



saveFile: function(data)
{
}


Where the function takes in data, has the user select a location to save the file, and creates a file in that location with that data.


Thanks in advance.


EDIT:

Using HTML is fine too, if that helps.






Rating: 5 out of 5 based on 4 ratings



The post Javascript: Create and save file appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/javascript-create-and-save-file.html

No comments:

Post a Comment