Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Save html-forms data to local disk?

Reply
Thread Tools

Save html-forms data to local disk?

 
 
grz02
Guest
Posts: n/a
 
      02-17-2004
A question on html-forms:

We have an application where users will get a CD with,
among other things, some html-forms for them to fill in.
When they click the submit-button, the data is transferred
to a webserver php-script that will then process the info.
The forms-definition looks something like this:

<form action="http://www.ourdomain.com/receiver.php" method="post">
<p>Question 1:
<p><textarea name="reply01" cols="40" rows="5"></textarea>
<p>Question 2:
<p><textarea name="reply02" cols="40" rows="5"></textarea>
<p>Question 3:
<p><textarea name="reply03" cols="40" rows="5"></textarea>
... etc ...
<p><input type="submit" value="Submit answers!">
</form>

Now, my concern is (since there might be quite a lot of data filled in),
if e.g. the internet-connection for some reason is broken
at the moment when the user clicks the submit-button,
there is a risk they will lose all the text and would have to re-type it,
which I would like to avoid, of course.

How can I best solve this issue?

Ideally, I would like to store the info on their local C: drive
before submitting, and automatically retrieve the text if they
later return to the page, but I guess that's not possible from
an html doc, right?

If so, any other suggestions how to resolve this issue?

TIA,
 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      02-17-2004
grz02 wrote:

> Ideally, I would like to store the info on their local C: drive
> before submitting, and automatically retrieve the text if they
> later return to the page, but I guess that's not possible from
> an html doc, right?


Kind of possible. You could use JavaScript to save info to a local cookie.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
 
grz02
Guest
Posts: n/a
 
      02-18-2004
Thanks for hint, seems like cookie would do the trick then...

Unfortunately, I dont have much experience w client-side scripting,
could someone please provide or point me to some sample-code
I could elaborate on here?

Thanks,


Toby A Inkster <(E-Mail Removed)> wrote:

> Kind of possible. You could use JavaScript to save info to a local cookie.

 
Reply With Quote
 
grz02
Guest
Posts: n/a
 
      02-18-2004
Found some very helpful code here:
http://www.echoecho.com/jscookies02.htm
so that problem is basically solved now.

But just realized I have a follow-up Question:

By experiment, it seems if I have two different
html-docs in the same local directory, say c:\dir
they will share the same cookie-string.

But if I have two html-docs in different local directories,
say c:\dir1 and c:\dir2 , they will have different cookie-strings
stored independently.

So the Question now is:

Is there any way to define a "global" cookie that will
be shared by all documents stored on the local drive,
regardless of the different directory-paths?

And where can I find some documentation that describes
such implementational details?

Thanks,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SAVE AS: a warning message says it can't save teo ASP .Net 1 07-23-2006 01:34 PM
Save contents of iframe from parent's save button user ASP .Net 1 04-04-2005 07:44 PM
cannot save or save as in word Phil Edwards Computer Support 0 07-12-2004 07:01 AM
word will not save or save as Alex B Computer Support 5 07-10-2004 05:23 AM
Save, Save As, Paste Phil Edwards Computer Support 1 06-27-2004 03:32 PM



Advertisments