Hi,
I’ve got an object that holds an array of all available cookies on a page.
I want to loop through that array, search for a set of cookies that I know by name. The may or may not be there in addition to other cookies. What I want to do is remove any cookies that are not the 5 that I want from the ojbect array, so that the array will only hold the 5 cookies that I want to deal with.
Only I’m not sure how to do this. I know this is probably totally off, but my guess is something like this…
[code]
<script>
var cookList = new cookieList(); //function that gathers all cookies on the page
for(i in cookList) {
if (cookList[i]) {
var ca = findCookieOjbect(“RA”, cookList); //function that will find a named cookie in the cookieList array
var cu = findCookieObject(“CU”, cookList);
var r = findCookieObject(“R”, cookList);
var ro = findCookieOjbect(“CA”, cookList);
var sp = findCookieOjbect(“SP”, cookList);
}
}
cookList[0] = ca;
cookList[1] = cu;
cookList[2] = r;
cookList[3] = ro;
cookList[4] = sp;
cookList.split(5, <5); // don’t know if I can do greater than 5 here
return cookList;
</script>