| Why would you want to eliminate the cookie when the browser window is closed?? The whole purpose of a cookie is so that it's stored for the user to return to the site??
If you mean, delete it after another visit to ths it or something, then ok...
Once you have declared:
_root.shareObj = SharedObject.getLocal("shareObj");
then your cookie is accessed and back in memory.
From here you can completly empty it... If you know the variables you have stored in it, just set them to "" (nothing), or 0, or something you can recognise in your code next time the site loads.
I can't find any actual code for destroying the cookie itself though. |