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

Read/update cookies both in ASP and JavaScript

Status
Not open for further replies.

VBGuy2112

Programmer
Feb 19, 2002
58
US
Hello. I have JavaScript that will read/update cookies very well and I can read these cookies with multiple keys from the ASP side. But I'm having problems updating a cookie in JavaScript that was originally created in ASP. When I do so, it creates a second cookie with the same name.

I can post my code if it will help....I appreciate any help I can get with this. I've been struggling with this.
 
Hey, I'm willing to take a look at the code. I can't promise anything but if you haven't figured it out yet. Post the Javascript and i'll take a look. Also... how do you write the cookie in ASP?

I hope I can help.


Travis Hawkins
BeachBum Software
travis@cfm2asp.com
 
Actually, I did figure it out...I had omitted the path parameter on the Javascript side which explains why I could rewrite cookies that were made on the javascript side but not on the asp side since it automatically defaults to "/" if you don't specify. I thought it defaulted to "/" on the JavaScript side also and it came up with a "/" when viewing a JavaScript-created cookie in a watch on the asp side. Once I put "path=/" in it worked just fine.

I thank you for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top