You can't save the items from a form into a text file or database without using a webserver (and ASP, CGI, PHP, JSP, .NET, etc etc).
Main Topics
Browse All TopicsHello,
I'd like to create a form and then save the values to a text file when the user clicks on the submit button. I'm trying to do this without a web server. I just want a file that opens with IE and then saves a text file back out. Hope this is making sense :)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
That's a way, as jaysolomon say, using ActiveX. That needs the user agreement to run correctly, and some antivirus detect it as a harmful script.
<html>
<head>
<script lanaguage="JavaScript">
function A()
{
var user = document.getElementById('a
var mail = document.getElementById('a
var phone = document.getElementById('a
var oas = new ActiveXObject("Scripting.F
var f = oas.CreateTextFile("c:\\Sa
f.WriteLine("User :" + user);
f.WriteLine("Mail :" + mail);
f.WriteLine("Phone:" + phone);
f.Close();
document.getElementById('a
}
</script>
</head>
<body>
<form name="a" action="page.pl" method="post">
<input type="text" name="user" value=""><br>
<input type="text" name="mail" value=""><br>
<input type="text" name="phone" value=""><br>
<input type="button" name="send" value="SUBMIT" onClick="A();">
</form>
</body>
</html>
The "false" at the end of create text file is to avoid rewritting an existing file on the client pc. Change it to "true" if you use a filename that you are sure that nobody can have on the pc. Do not use that to create more files that the user expects.
jbosch(vosk)
True, ActiveX is only for MSIE. If you want to use some severside scripting you must use a program to run your scripts on your pc as if they were on the server; so for a home working an ActiveX is easy to use, create and modify, and I suppose that you don't have any problem on using the IE browser (althought I know someone that have moral prejudices on using MS products).
Thank you for the points, and glad to help.
jbosch(vosk)
Business Accounts
Answer for Membership
by: arumallaPosted on 2003-07-02 at 11:13:38ID: 8842680
hi
you can create a "mailto" action for the submit button.. so that you can get the form values as text in to your email...
for this you doesn't need a web server...
hope this helps...
cool..
Chandra.