Click here to Skip to main content
15,921,062 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to create a web form. i dont want to send data to any server. but want to store the data entered in the form on my desktop in a text file.
Posted

You can do this using an ActiveX object in JavaScript.

Sample would be something like:
XML
<html>
<head>
<script language="javascript">
function WriteToFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\Test.txt", true);
s.WriteLine("Hello");
s.Close();
}
</script>
</head>
<body onLoad="WriteToFile()">
</body>
</html>
 
Share this answer
 
You can't do that using Javascript, since it has no access to your local filesystem. The nearest thing to that is the new HTML5 client-side storage, but that doesn't sound like what you're after either.
 
Share this answer
 

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