unload()

P

Pierre Laporte

I would like to use the unload() event to keep users in my pages unless they
click on the EXIT button I put in my web application.
Can anyone help me there, especially how I can differentiate the click on a
form button or on a URL that belongs to my web app from the click on
browser's buttons like Back, Next, Refresh...
Thanks.
Pierre
 
D

David Dorward

Pierre said:
I would like to use the unload() event to keep users in my pages unless
they click on the EXIT button I put in my web application.

Not possible. http is stateless, live with it.

(So have your application time out logins rather then waiting for users to
log out explicitly)
 
R

rf

Pierre Laporte said:
I would like to use the unload() event to keep users in my pages unless they
click on the EXIT button I put in my web application.

With all due respect: how bloody rude. They have just left your site, let
them. This is just like locking the door on your shoe shop when you see a
customer about to walk out. You will guarantee that visitors never come
back.
Can anyone help me there, especially how I can differentiate the click on a
form button or on a URL that belongs to my web app from the click on
browser's buttons like Back, Next, Refresh...

You can't.

You also can't tell if your viewer has simply turned her computer off.

Cheers
Richard.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top