Page 1 of 1
possible for html form run on PC and save data to disk
4 Replies - 18585 Views - Last Post: 12 March 2009 - 11:37 PM
Posted 17 May 2007 - 09:25 PM
Here is the ideal for my survay form,
1. user click "start" button for the e-test,
2. user need to finish the e-test with in 20 minutes, after 20 minutes the form will auto submit and the data will save into file,
3. me will go to the file folder open it and print out the qestion and anwser.
4. The file will be detele after i print out and the next user can do the e-test again.
I got the time counter and the auto submit script. but i just have no ideal how to save the data into file.
can someone pleave give me a guide or ideal to do this?
Posted 18 May 2007 - 04:59 AM
Posted 12 March 2009 - 06:02 AM
There are a number of ways that you can save data though:
Generally you can send data back to the server and then the sever can save the data (you don't even have to use ajax). In fact this is normally how such things are done. This does add the wrinkle of needing to keep track of users and sessions on the server.
You can also use a cookie. This allows you to save a set of name-value pairs on the client. However don't let such things bother you. to save complex data people often base64 encode the data and then make the cookie a name value pair such as: "data=AG475gS6s63jx83&sheGE3432..." -- you can save up to 4k in 1 cookie.
You can send the data to the user as a file for them to download -- they will have to choose where to save the data, and when it comes time to load the data they will have to find it for you again (so that it can be uploaded to your server) -- not all that different from a normal app.
You can write your own browser extension to save the data. Often this ends up being a very browser specific solution. There is also a pretty good chance that your extension will be considered mal-ware and eventually found and removed by virus scanners or spyware scanners because it would enable a page to violate security. -- even if you don't use it for evil others might.
This post has been edited by NickDMax: 12 March 2009 - 06:03 AM
Posted 12 March 2009 - 11:37 PM
Number of downloads: 573