/    Sign up×
Community /Pin to ProfileBookmark

Need some help with Cookies

[B]Hello all who can help[/B]

I have a problem with reseting my cookies…..

I want my page to set cookies to zero on onload, but i csnt seem to get it right……

this is my code:

<? setcookie(“Test”, “1”); $noheader=ON; include(‘up.php’); ?>

<SCRIPT language=”JavaScript”>
function confermaclose() {
event.returnValue=(‘Attenzione se vuoi importare un’altra lavorazione dovrai inserire nuovamente il nome utente e la password per accedere ad EDILBANCA!!! Vuoi uscire?’);
}

function restest() {
event.setcookie(“Test”, “”);
}

</SCRIPT>

<body onbeforeunload=”confermaclose();” onUnload=”restest();”>

</body>
</html>

what should i do…..this does not work and i dont know why
could anyone touch up the code for me to make the cookies reset to zero
if so thanks in advance

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @claire_moore spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...