I am being returned “-1”. Not sure if i am creating incorrectly (cookies exist and are listed at 161 or so), but not sure if mine is in this group.
<html>
<body>
<div id="cookieLaunch" onClick="cM()">abcdef</div>
<script>
function cM(){
var cookie_date = new Date ( 2011, 01, 15 );
document.cookie = 'ppkcookie1=testcookie; expires='+ cookie_date.toGMTString()+'; domain=myDomain.com';
alert(document.cookie.indexOf('ppcookie1='));
}
</script>
</body>
</html>
Solved
I was trying to find the cookie in a way that was not finding it.
personal error.
It looks like you have an extra or missing k in ppkcookie or ppcookie. 🙂
Here you have ppkcookie:
And here you have ppcookie: