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

get cookie value from another domain

Status
Not open for further replies.

920506

Programmer
Joined
Jun 13, 2003
Messages
201
Location
US
Hi all,
I don't know much about JavaScript. My question is:

I have a page running on it has a cookie name id is set up using JavaScript. On this page, there are some asp page links which are running on If I use Reqeust.cookie("id") in asp page running on domain2, can I retrieve the cookie value I set up on a html page in I am just lost.
thank you
 
No, the security wont allow it.

However, if you set a cookie for mydomain.com you could get it from both site1.mydomain.com and site2.mydomain.com

But if you set it for site1.mydomain.com you can't get it from site2.mydomain.com

 
Hi Sheco,
Thank you to point that out. Do you have a good way to pass the value(cookie) in this case.
Betty
 
Pass it from what to what? Probably put the value in the URL, like:

domain2.com/page.htm?value=MyValue

and then read it on the page referred to.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top