Save and Restore Form Cookies | JavaScriptSource

Save and Restore Form Cookies

Tony Davis Feb 3, 2006

General

This script will save all of your form fields in a cookie. It includes all text fields, radio button selections, checkbox values, etc. When your visitor returns, all form fields are automatically repopulated with the same value that they entered on their last visit.


Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: saveRestoreForm.js


Head

Paste this code into the HEAD section of your HTML document.


Leave a Response

(12 comments)

This works great! Just what I was looking for. Thanks!!

Michael D Nov 3, 2008

Due to the limitations of these comments, you will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Underwood Jan 29, 2008

I can't make this work. I get a javascript Runtime error at line 39 Error: 'null' is null or not an object[br /][br /]Has anyone been able to make this script work?

Warren Taylor Dec 7, 2007

Due to the limitations of these comments, you will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Nov 7, 2007

I want to save and restore form cookies to a form developed by my self. I designed a form using tables. Could you tell how your code can be implemented to tables.

sravan Nov 6, 2007