Forum Moderators: open
1) Get postid through voting function
2) Check to see if the cookie voteids exists
3) If not create cookie voteids with a value of postid with a underscore char
4) if cookie does exit add postid with underscore after the current cookie value
function voting(postid)
{
if (document.cookie.length > 0)
{
var begin = document.cookie.indexOf(voteids+"=");
if ( begin!= -1)
{
begin += voteids.length+1;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
{
end = document.cookie.length;
}
var ids=document.cookie.substring(begin, end);
ids +=postid+"_";
document.cookie = "voteids="+ids+"_";
}
else
{
document.cookie = "voteids="+ids+"_";
}
}
else
{
document.cookie = "voteids="+ids+"_";
}
}