[thelist] help looping through a cookie to get vars..

Tom Dell'Aringa pixelmech at yahoo.com
Fri Jan 10 10:44:02 CST 2003


I have a document.cookie that has a variable number of cookies like
this:

pid112=3
pid234=1
pid211=6

So, the cookie might look like this:

user=default; sessionno=232314; pid112=3; pid234=1; pid211=6

I also have a function called getCookieData(cookieName) that I can
use to extract the value. I'm just not sure on a good way to run
though and get them. Do I need to say, loop through 1-top value of
PID? for example:

for(x=1; x<=PID MAX VALUE; x++}
{
  getCookieData(pid + x)
}

Or is there a better way?

TIA

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list