Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Multiple cookies


Message #1 by "Alexander Bienz" <alex@v...> on Mon, 20 Aug 2001 11:37:24
I'm having a problem creating cookies and I wonder if you could perhaps 
guide me in the right direction. 

I have a website that has a page with a survey on it, on the homepage for 
this site I have written some Jscript that checks for a cookie, if this 
cookie doesn't exist then it opens up the survey page, on the survey page 
once the "submit" or "don't show me this again" button is clicked a cookie 
is created so that when the user visits the site again the survey doesn't 
show. 

This part works fine, my problem lies ahead... 

A friends wants his website to work in a similar fashion, he opens up his 
homepage and it checks for a cookie, if it doesn't exist then it links to 
a similar survey page on MY site, this is because all the details entered 
in the survey are stored on a database on my server, this is good too, 
except when the cookie is created with a different name, I've noticed that 
in my cookies folder on my computer it puts an entry in the file that the 
cookie for my site is stored!? 

I was under the impression that these files in the cookies folder were 
infact the cookies, not entrys for each domain containing cookies. Is this 
right or am I on the wrong track? 

Because this happens, when my friend goes to his site he will always get 
the survey pooping up, which of course he doesn't want 

Any ideas? 

Cheers, 
         Al.

  Return to Index