Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookie question

Status
Not open for further replies.

sqoti

Programmer
Dec 1, 2000
50
US
I am new to using cookies and have a scenario I wanted to throw out here on Tek-tips to see if I can get a bite.

I want to have a form submit that captures the value entered and save it into a cookie----easy

Then I want to have a separate window or browser be able to get that cookie and use it the way it wants--don't know how?

Any ideas would greatly be appreciated!!!

Thanks in advance,

sqoti
 
faq216-1956 faq216-2297

Either of these approaches will do the job. Simpy use a function to write the cookie containing your value on the first page. Then one to read the cookie on subsequent pages. You can read the cookie value directly into a javascript variable so instead of:

var username = 'Fred';

you can use:

var username = readCookie('Username');
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top