Click here to Skip to main content
14,869,740 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am developing mobile web app for conducting survey in html5. i need to save user responses in file preferably in csv format. How can do it? i am stuck with storing part.......... please please help me.

I cannot use activex for dat purpose coz app needs to work on android+ windows tablet.

thanx in advance.
Updated 13-Apr-17 16:52pm

Does this[^] help?
<script language="Javascript">
function download(filename, text) {
  var pom = document.createElement('a');
  pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + 

  pom.setAttribute('download', filename); = 'none';


function addTextHTML()
{ = + ".html"

function addTextTXT()
{ = + ".txt"

<form name="addtext" onsubmit="download(this['name'].value, this['text'].value)">

<textarea rows="10" cols="70" name="text" placeholder="Type your text here:"></textarea>
<input type="text" name="name" value="" placeholder="File Name">
<input type="submit" onclick="addTextHTML();" value="Save As HTML">
<input type="submit" onclick="addTexttxt();" value="Save As TXT">

Kats2512 14-Apr-17 1:41am
Do you really think the person who asked the question would still be looking for an answer after 5 long years?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900