Closed Thread Icon

Topic awaiting preservation: multiple cookies for the same job Pages that link to <a href="https://ozoneasylum.com/backlink?for=9016" title="Pages that link to Topic awaiting preservation: multiple cookies for the same job" rel="nofollow" >Topic awaiting preservation: multiple cookies for the same job\

 
Author Thread
kalan
Obsessive-Compulsive (I) Inmate

From: Stirling, ON, Can.
Insane since: Feb 2004

posted posted 02-10-2004 23:12

What I'm trying to achieve:

function decide_which_cookie_to_use() //terribly inconvienient name but self explanatory
{
if (document.cookie.cookie1.set) // 'set' being what I'm unsure of, is this a property?
{
return cookie2(); //a second cookie which saves for the same variable, new info
}
if (document.cookie.cookie2.set)
{
return cookie3();
}
else{return cookie1();} //if neither cookie2 or cookie3 are set use cookie1
}

I may be way off with this but it seems logical, ANY advice or critisism would be much apreciated.

If your long winded but willing - kalanm4@hotmail.com


kalan, like 'allen' with a 'k'

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 02-11-2004 03:01

I'm having a little trouble following what you are doing w/this chunk of code. In the future, you may want to use the UBB code for a code block so that others can look at your logic instead of trying to count braces.

When you ' return cookie2() ' are you returning the value of a function named cookie2() ? The same question applies to the rest of your return statements.

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

Taobaybee
Maniac (V) Inmate

From: The Pool Of Life
Insane since: Feb 2003

posted posted 02-11-2004 03:42

Cookies?

slinks away slightly embarresed muttering oh those cookies

« BackwardsOnwards »

Show Forum Drop Down Menu