writing a cookie with data from a form on one page, retrieving data from that cookie in a new page and then send it with a new form on a separate page

Ok, heres what Im trying to do (all on client-side)

Some Javascript may help here too I expect.

1) the user enters his name in the name field on the address form on web page A

2) his name gets saved to a cookie locally.

3) If the user visits web page b and fills in the addresschange form, the name from address form A is then retrieved from the cookie and stored in a field name on form B on web page B.

4) After compleing form b on web page B, the user submits form B.

5) the Name saved in the cookie on form A also gets sent with the new address details entered on form B.

In a nutshell, I'm copying one item of field data from one form on one web page into a different fieldname on another form on another page and submitting the second form. Easy eh?

I'm using html and javascript all client-side.

Grab them points !!!

Any help appreciated!


Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

CoolEthanConnect With a Mentor Commented:
Hmmm, know PHP, pretty easy and then you can just do session variables.  Something im happy to post examples of if you want to go this route, not that much different than javascript.  I dont do much javascript other than validation, but here is a link: http://www.js-examples.com/asp/cookie.php .  In this you will find an example of some session variables about halfway down, the guy is talking about his "shopping cart".

"You can store a lot of information in a session variable. I recently built a shopping cart system that stored the users order in a session variable. Here's how it worked.

order = "Item name: " & myitemname & vbcrlf & "Item Price: " & itemprice & vbcrlf
session("order") = order

See how easy that was? Simply build a variable and give it it's values. Then assign a session("whatEverNameYouWant") equal to the variable. Then on each page where you need to carry the order to, simply refer to this session like this:

order = request(session("order")
<head><title>Order Page</title></head>
You have placed an order for the following: <br>
</body></html>" -- Geoff Swartz
That page also had some stuff about cookies as well!
All Courses

From novice to tech pro — start learning today.