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

Posted on 2005-03-09
Medium Priority
Last Modified: 2012-06-22
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!


Question by:trix1210
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

CoolEthan earned 500 total points
ID: 13503445
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

Expert Comment

ID: 13503449
That page also had some stuff about cookies as well!

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question