GorGor1
asked on
checking if cookie exists
I set a cookie with Perl. Now on each page, I'm going to include a piece of javascript that checks if the cookie exists. I don't care what information the cookie holds because it doesn't matter. I just want to know if the cookie exists. If it doesn't exist, I'm going to redirect to an 'Error' page. Any ideas?
if (!document.cookie)
{
//your re-direction code goes here
}
Cd&
{
//your re-direction code goes here
}
Cd&
ASKER
How does that code know which cookie I'm looking for?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad I could help. Thanks for the A. :^)
Cd&
Cd&
ASKER