Hi there:
I have made a simple HTML form. I ONLY want this form for off-line purpose on my computer, not on the internet.. I don't want the form to go to email or on the web. If I fill-out the form on my computer ... can I save the data entered into the form on my hard drive? may be save it as text or whatever readable file so I can retrieve it later on? If such thing exists please send or direct me where I can download such script? Thank u so much.
Welcome to TSDN (The Scripts).
You will need some server-side code to do this, or if you're using IE and possibly change your settings, you could use an ActiveX object in JScript, e.g.
- // Instantiate a File System ActiveX Object:
-
var fso = new ActiveXObject("Scripting.FileSystemObject");
-
var txtFile = fso.CreateTextFile("c:\\testfile.txt", true);
-
txtFile.WriteLine("This is a test.");
-
txtFile.Close();
where instead of "This is a test." on line 4, you'd write in the form values on form submit.
If you wanted to load the values, you read from the file.
One other option is to save the values in cookies, see
this page. That's a better solution because it's cross-browser.