close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

delete cookie behavior not working

Thread began 8/07/2009 11:09 am by sandy170299 | Last modified 8/07/2009 11:35 am by sandy170299 | 2900 views | 4 replies |

sandy170299

delete cookie behavior not working

I am using the cookies toolkit to create and then delete cookies in ColdFusion. It is not working. On my log out page, this is the script that I am using to delete the username cookie:

<script type="text/javascript">
<!--
function WA_deleteCookie(cookieobj, cookiename, cookiecheck) {
if (cookiecheck) {
cookieobj.setValue(cookiename, "");
cookieobj.expire(cookiename);
}
}
//-->
</script>

This is the body tag: <body onload="WA_deleteCookie(WA_CookieObj,'username',true)">

But when I output the cookie value, it is still there: <cfoutput>#Cookie.username#</cfoutput>

Am I doing something wrong?

Sign in to reply to this post

Ray BorduinWebAssist

It would show on the page at first, since the server code runs before the onload code, but it should be gone when you refresh the page or go to another page without setting the username. It is also possible that you are setting it again somewhere.

Sign in to reply to this post
Did this help? Tips are appreciated...

sandy170299

The cookies toolkit script is not deleting the cookies. However, if I write manual code to do so it's working. At least I have a workaround....

Sign in to reply to this post

Ray BorduinWebAssist

Is the javascript being called properly? You may want to try adding in an alert() to see if the script is running at all. Maybe the necessary functions or includes aren't on the page. There are several possibilities why it may not have worked, but I guess you probably have a workaround so it dosn't matter much.

Sign in to reply to this post
Did this help? Tips are appreciated...

sandy170299

It would be nice to have it all automated, because I'm tired of writing my own login scripts :), but as long as I have a workaround, I'm fine with that.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...