How can i save HTML form input to a cookie using Javascript?

chris j

New member
I am constructing a small web application where I am allowing the user to enter a name and a phone number in a HTML form - which then needs to be saved to a cookie (text file) on the local machine.

I need to then be able to re-call this information in future sessions and display it using Javascript.

However, so far I have had no luck. I have tried to save each entry as a variable and then write them to the external file using a 'submit' function but i'm obviously going wrong because I'm quite new to this. Anyone out there who can lend a helping hand or some pointers?
 
Here's a tutorial on cookies using javascript....

http://www.quirksmode.org/js/cookies.html

and another one.....

http://www.w3schools.com/js/js_cookies.asp
 
Back
Top