hi all,
i have a login page in which i am creating a cookie object, now when i am in the same page, i am able to read and write cookie easily and without any problem.
this is the code which i use to create the cookie
- var exdate=new Date();
- exdate.setDate(exdate.getDate()+expiry);
- document.cookie=c_name+ "=" +escape(value)+" : "+expires="+exdate.toUTCString();
and i am passing these values
c_name= 'com_value';
value= 'true';
expiry= 24*1000;
but when i login, i am getting null as the value. even though the object is there in the browser and its showing true.
i even tried the javascript method for showing all the cookies, but no luck.
its now even showing the cookie key which i am looking. i tried this statement to test the value
alert( $.cookie("com_value") ); ( i am using jquery cookie plugin )
can anyone tell me what can be possible errors here? is it not possible to get the cookie value on any page other than the current page.