How could I use AJAX to create a Json data source .txt file?
- by Adam
I'm creating a form that collects standard information about customers. When the user hits save, I would like to create a .txt file that would be used to later retrieve all of the data collected from customers. I'm using DataTables which is a jQuery plugin to display the data. The .txt file would be formatted to be saved as such:
{ "aaData": [
["client 1 name","address","city","state","zip"],
["client 2 name","address","city","state","zip"],
["client 3 name","address","city","state","zip"],
...
["client x name","address","city","state","zip"]
] }
Where "aaData": is used by DataTables. This is going to part of an iPhone app, so the data source has to be very small and not reliant on a constant connection to a server, so, essentially, a client-side data source. The .txt file has to also be updated when edited and saved, and then replaced every time it is downloaded.