471,616 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,616 software developers and data experts.

cancel the 'unload' action in 'onbeforeunload' event

What code can I put in the 'onbeforeunload' event to cancel the 'unload'
action (when user closes browser) and then present the user with an
alert saying that he/she must use the logout button.

Jul 23 '05 #1
6 15737
On Mon, 19 Jul 2004 10:13:43 -0400, Marcia Gulesian wrote:
What code can I put in the 'onbeforeunload' event to cancel the 'unload'
action (when user closes browser) and then present the user with an
alert saying that he/she must use the logout button.


....Bwa! Ha Haaaa Ha Haaa... good one!
What? ..You're *serious*?

What happens when the user presses these keys?
<http://www.physci.org/kbd.jsp?key=ctrl+alt+del>

[ The 'user must log out' is an FAQ across HTML,
Site-Design, Java, JS... groups. You cannot
*guarantee* a log-out. ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
According to dhtml books from o'reilly et al, , this can be done.

Marcia Gulesian wrote:
What code can I put in the 'onbeforeunload' event to cancel the 'unload'
action (when user closes browser) and then present the user with an
alert saying that he/she must use the logout button.


Jul 23 '05 #3
On Mon, 19 Jul 2004 10:40:08 -0400, Marcia Gulesian wrote:

(force log-out)
According to dhtml books from o'reilly et al, , this can be done.


...and do they mention exactly how, as opposed
to vaguely waving hands about and espousing how
it *should* be possible? You're the one with
the book Marcia, what does it say?

I would be especially interested to hear how
they propose preventing the user from disconnecting
the cable that connects them to the internet,
or turning the computer off at the wall.

OTOH, I thought the c.l.js FAQ might mention
something about it.. ahh yes,
<http://www.jibbering.com/faq/#FAQ4_29>
and.. back to where I started. 'No'.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #4
In article <40**************@theworld.com>, mg@theworld.com enlightened
us with...
According to dhtml books from o'reilly et al, , this can be done.

Marcia Gulesian wrote:
What code can I put in the 'onbeforeunload' event to cancel the 'unload'
action (when user closes browser) and then present the user with an
alert saying that he/she must use the logout button.



Really?
Post the source that gave you the impression that it could be done
*reliably*.

There's a very big difference between "can be done" and "can be done
reliably".

I can do a lot of things that only work in IE6 with javascript enabled
on a windows box with low security settings. Those things are generally
used in an HTA and are useless for much else. This group assumes cross-
browser internet use unless otherwise specified.

--
--
~kaeli~
Murphy's Law #3020: Quality assurance doesn't.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #5


Marcia Gulesian wrote:
What code can I put in the 'onbeforeunload' event to cancel the 'unload'
action (when user closes browser) and then present the user with an
alert saying that he/she must use the logout button.


Well check the documentation, here it is:
http://msdn.microsoft.com/library/de...foreunload.asp

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #6
Thanks!

Martin Honnen wrote:
Marcia Gulesian wrote:
What code can I put in the 'onbeforeunload' event to cancel the 'unload'
action (when user closes browser) and then present the user with an
alert saying that he/she must use the logout button.


Well check the documentation, here it is:
http://msdn.microsoft.com/library/de...foreunload.asp

--

Martin Honnen
http://JavaScript.FAQTs.com/


Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mike | last post: by
reply views Thread by Joe E. | last post: by
1 post views Thread by David | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.