Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my page is not working with cookies using javascript and url redirecting

if userid/username(cookies) already in my browser, it comes thank for vote,otherwise it goes to login page..what is the problem in below code

<script type="text/javascript">

var userid = document.cookie;
var username = document.cookie;

if (userid != null && username != null)
{
$('.review-footer-new').find('.review-feedbackLink').click(function () {

if ($(this).closest("a").is("[disabled]")) {
return false;
}

$(this).addClass("selected");
$(this).parent().after(" Thanks for your vote! ");
$(this)
.closest(".review-feedbackQuestion")
.find(".review-feedbackLink")
.closest("a")
.attr("disabled", "disabled");
});
}
else
{
window.location = "http://localhost/login.aspx";
}
</script>
Posted
Updated 28-Apr-15 0:43am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900