Javascript with expiring cookie

M

Mo

I am looking for a JavaScript that will allow me to open a pop-up
window "onUnload". The pop-up window should set a cookie on the users
computer that expires in 'n' number of days.
 
R

Randy Webb

Mo said:
I am looking for a JavaScript that will allow me to open a pop-up
window "onUnload". The pop-up window should set a cookie on the users
computer that expires in 'n' number of days.

So, after I leave your site, you want to *attempt* to annoy me by
opening yet another ad window?

And *if* I allow the cookie, do I get cyber-milk with it?

Stop trying to annoy people after they have left your site. They are
gone, let them go in peace.
 
T

Tim Williams

Cardman said:
On Sun, 01 Feb 2004 13:35:12 +0000, Randy Webb
<trim>
Just what do you have against cookies by the way? When being able to
recognize what one of your customers it is when they visit your site
has always seemed like a good idea to me, when you can welcome them
with like "Hello Randy, Welcome Back!".

Cardman
http://www.cardman.com
http://www.cardman.co.uk

I've always thought that was more creepy than anything else. Anyway,
what has opening a new window got to do with setting a cookie? This
can be done anytime from the main window.

Tim.
 
M

Michael Winter

Well, there are valid uses for this function don't forget, even if
better options could exist.

[snip]

The onunload intrinsic event is unreliable and should be avoided. Browsers
consider different things "unload events". For example, I think IE fires
onunload when a page changes, is refreshed, and when the window is closed.
Opera only fires it when the page is changed. I haven't got around to
installing Netscape and Mozilla, so I can't compare them.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top