[thelist] JS cookie question (ignore previous)

Tom Dell'Aringa pixelmech at yahoo.com
Fri Jan 10 11:15:01 CST 2003


Oops, sorry about that! Wandering fingers on the keyboard :/.

I'm able to pull a list of my cookies that have the prefix 'pid' with
the following code:
------------------------------------
pidMaxValue = 200;

for(x=1; x<=pidMaxValue; x++)
{
  cookieName = "pid" + x;
  thisCookie = getCookieData(cookieName);
//write them out to see
}
------------------------------------
Now my test cookie is pid111=1. My problem is I get these results
pulled:
------------------------------------
pid1= (1=1)
pid10= (=1)
pid11= (=1)
pid111= (1)
------------------------------------
So it sees pid111 as a value for 1, 10, and 11 and 111 which is odd.
It's actually pulling apart the cookie to give me the = sign as part
of my response.

Any idea why this is or how I can fix it?

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