...

View Full Version : Resolved Delete Cookie with button



MancunianMacca
03-04-2012, 08:38 PM
I have been searching the internet for thhe past hour trying to find this and searched this forum, I am trying to Delete my cookie with a button.

On my websitr I have a cookie to remember the name of the user, I want them to be able to change their name with a button. so delete cookie. How can this be done? The cookie names its seld "UserName" if this helps.

felgall
03-04-2012, 08:58 PM
You delete a cookie by setting its expiry date in the past when you write over it.

MancunianMacca
03-04-2012, 09:01 PM
You delete a cookie by setting its expiry date in the past when you write over it.

And how would I go about doing that? With a button.

Logic Ali
03-04-2012, 09:34 PM
On my websitr I have a cookie to remember the name of the user

How do you set that cookie in the first place?

MancunianMacca
03-04-2012, 09:39 PM
How do you set that cookie in the first place?

http://www.codingforums.com/showthread.php?t=253151

Lerura
03-04-2012, 09:58 PM
In Post#2 on the thread you have just linked to, Philip M gave you 3 functions:
createCookie, readCookie, and eraseCookie .....

Logic Ali
03-04-2012, 10:02 PM
http://www.codingforums.com/showthread.php?t=253151

<input type='button' value='Forget your name' onclick = 'createCookie ( "UserName", 0, -1 );'>

MancunianMacca
03-04-2012, 10:24 PM
Thanks :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum