Forum Moderators: open

Message Too Old, No Replies

display all javascript cookies

display all javascript cookies

         

adrianbromfield

1:20 pm on May 2, 2008 (gmt 0)

10+ Year Member



hey guys i am wondering if you can help me, i may be having a brain dead moment!

i have a small script that creates and erases cookies depending where people click so there is never a definate amount of cookies active all the time. To write this i had help from internet, however the bit i need i dont seem to be able to find, and as im not the worlds greatest with javascript im stumped. what i would like to do is run a small loop to find which cookies are currently active when the page is loaded. Does anybody know how to do this?

i need to run a small if statement on each one that currently exists. Any help would really be appreciated.

Thanks,

Adrian

daveVk

6:37 am on May 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Something like this maybe ?

if ( document.cookie ) {
var cs = document.cookie.split(";");
for ( var i=0; i<cs.length; i++ ) { alert( cs[i] ); }
}