View Full Version : writing javascript session cookies, weird function behavior

08-27-2007, 04:07 AM
I running this code:

function testCookie() {
document.cookie = "testSessionCookie=Enabled";
if (getCookieValue ("testSessionCookie") == "Enabled") {
} else {
alert('does not work!');


It doesn't alert anything at all! what am I doing wrong?
I am familiar with php cookies, regular cookies vs. session ones...etc..
I am not with javascript ones..

What I want to do is create session cookies with javascript so that they immediately be destroyed, if there is no way to make session variables with JS, then i'll settle for a way to destroy them immedietaly

Thanks for the help :)

Philip M
08-27-2007, 08:04 AM
Lots of good tutorials available:-



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum