Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
63
rated 0 times [  68] [ 5]  / answers: 1 / hits: 18019  / 12 Years ago, tue, april 10, 2012, 12:00:00

I have a DNN installation but one of the portals is broken and the logout button doesnt seem to clear the cokoie. Is it possible to use jquery to clear a specific cookie? or a seperate ASP.NET page?


More From » jquery

 Answers
59

Sure, Using cookie plugin like this



$.cookie(name, null);


Update:



if($('a[href=webiste.co.uk/en-gb/admin.aspx]').length) {
$.cookie(name, null);
}





Update 2: Pure Js



function deleteCookie(name) {
document.cookie = name+'=;-1; path=/';
}

var login = document.getElementById(loginlink);
login.onclick = function() {
deleteCookie(name);
};

[#86337] Monday, April 9, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cody

Total Points: 679
Total Questions: 111
Total Answers: 111

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
;