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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save variables as cookies maybe

Status
Not open for further replies.

onpnt

Programmer
Dec 11, 2001
7,778
0
0
US
I want to know if it is possible to have a add button for a user to click and save three or four str variables for being loaded into a different page when opened. variables would already be giving values but only to save if the onclick is performed. Desperate help. Not much time to figure out. Thanks onpnt
 
Hi,

- You could use the URL to get your values on the second page.
I never used it but its something like that :
http://myURL?myVarA=myValueA&myVarB=myValueB
To get it from the second page you must use server.request and I don't remember what you have to pass as parameters...

- You could use cookies as you said. I use it.
CookieName = "Name_of_my_cookie"
CookieValue = "Value of my cookie"
Expire = "Time in millisecond or nothing for immortality ! ;) "
[/b]document.cookie = CookieName + "=" + escape(CookieValue) + (Expire) ? "; expires=" + Expire.toGMTString() : "")[/b]

I hope it helps you...
--
X-) Split.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top