PDA

View Full Version : How can i clean cookie when change screen


Americo
08-29-2002, 06:04 PM
Hi,
How can i explain my problem.

I have a cookie with information and when i read the cookie i can clean the information of cookie with a button.

My problem is when i change the window. That is, i have tabs and when select one tab to see other window i need to clean the cookie before to load other window.

Is necessary to put a function to clean cookie on all links? or exists other way in the body or form to call one function that cleans the cookie.

Thanks,
Americo

SIGINT
08-29-2002, 07:03 PM
Hi,
try this:

<BODY onUnload="doSomething()">

This will execute the function,when you leave the page...

SIGINT

boywonder
08-29-2002, 10:48 PM
or you could destroy the cookie immediately after you read it. Save it in a global var if you need to use it again within that page.