Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

can some explain me is there a way to convert the html5 local storage data into a csv file and store it inside ipad.

i have an html page with some text fields. when user click the submit button it is stored inside the html5 local storage. then i need to use that data to create a csv file and store it locally inside ipad app.

Let me tell my requirement. 1) get the text field data from the html page and save it to my local storage 2) get the data from the local storage and write into a csv file and save it inside an ipad 3) attach that file to the email from my app it self so i need the file path and file name to send it as attachment. 4)i have written an objective c function which sends the data 5) i call the objective function from javascript

These things are done in ipad application which uses html5 and javascript

share|improve this question
What have you tried? And, by the way, there's no way to do "save a file" in the client. All you can do is to store it in a sandboxed space. – MaxArt Apr 9 at 7:21
i actually tried to send an attachment to my email. – user1344213 Apr 9 at 7:31
Let me tell my requirement. 1) get the text field data from the html page and save it to my local storage 2) get the data from the local storage and write into a csv file and save it inside an ipad 3) attach that file to the email from my app it self so i need the file path and file name to send it as attachment. 4)i have written an objective c function which sends the data 5) i call the objective function from javascript – user1344213 Apr 9 at 7:31
These things are done in ipad application which uses html5 and javascript – user1344213 Apr 9 at 7:40
Edit your question so that someone can answer without reading the comments. Your objective C function cannot access to the sandboxed file system, so you have to try something else. And I'm not even sure if you can call it from Javascript. – MaxArt Apr 9 at 9:38
show 1 more comment

1 Answer

To write a file to the system using JavaScript, you would need to use the HTML5 File Writer API (Can I write files with HTML5/JS?).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.