• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Javascript include reading cookies across domains?

We use Netsuite for our CRM/ERP System.  Our Contact form on our website is actually served up from Netsuite (https://forms.netsuite.com/app/site/crm/externalleadpage.nl?compid=TSTDRV353218&formid=3&h=c9cfe3394a58a39a833e&category=3&leadsource=99995).

That form, while hosted at Netsuite, refers to a javascript include on our site.  This javascript reads a cookie and sets the phone number based up on the referring site.  The cookie is not being found from the javascript.

Is there any way for a cookie to be read across domain names?  I had thought since the include file is on our domain - it would read the cookie.  I guess not.

Thanks.

Jennifer
0
carecorejen
Asked:
carecorejen
1 Solution
 
dwaynecharringtonCommented:
Cookies cannot be read from another server. This is a security limitation of JavaScript and you'll have to go around it another way. There are definitely other ways to do this. Cookies can only be accessed by the domain they're created on.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now