Forum Moderators: open

Message Too Old, No Replies

Javascript Cookie Path issue

JS keeps setting the path to the directory the script is in!

         

JAB Creations

7:13 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This cookie keeps setting the path to the directory it is in and not the full domain. I've visited dozens of sites and none of them were helpful...

document.cookie='cookie=value;time()+2592000;/;'

JAB Creations

8:21 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got it...
document.cookie='cookie=value;path=/;time()+2592000;'

Though now I'm having trouble having pages in a different folder using the cookie. I'm using this cookie to change the stylesheet. The files in the path /home are working fine. If I change the cookie path to /mplayer then the music player pages change the stylesheet fine but not the other pages. The script is located under Home and then Themes on my site in my user profile.