cancel the 'unload' action in 'onbeforeunload' event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcia Gulesian

    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.

  • Andrew Thompson

    #2
    Re: cancel the 'unload' action in 'onbeforeunload ' event

    On Mon, 19 Jul 2004 10:13:43 -0400, Marcia Gulesian wrote:
    [color=blue]
    > 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.[/color]

    ....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=ctr l+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

    Comment

    • Marcia Gulesian

      #3
      Re: cancel the 'unload' action in 'onbeforeunload ' event

      According to dhtml books from o'reilly et al, , this can be done.

      Marcia Gulesian wrote:
      [color=blue]
      > 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.[/color]

      Comment

      • Andrew Thompson

        #4
        Re: cancel the 'unload' action in 'onbeforeunload ' event

        On Mon, 19 Jul 2004 10:40:08 -0400, Marcia Gulesian wrote:

        (force log-out)[color=blue]
        > According to dhtml books from o'reilly et al, , this can be done.[/color]

        ...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.c om/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

        Comment

        • kaeli

          #5
          Re: cancel the 'unload' action in 'onbeforeunload ' event

          In article <40FBDD48.1609E 83@theworld.com >, mg@theworld.com enlightened
          us with...[color=blue]
          > According to dhtml books from o'reilly et al, , this can be done.
          >
          > Marcia Gulesian wrote:
          >[color=green]
          > > 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.[/color]
          >
          >[/color]

          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.



          Comment

          • Martin Honnen

            #6
            Re: cancel the 'unload' action in 'onbeforeunload ' event



            Marcia Gulesian wrote:
            [color=blue]
            > 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.[/color]

            Well check the documentation, here it is:


            --

            Martin Honnen


            Comment

            • Marcia Gulesian

              #7
              Re: cancel the 'unload' action in 'onbeforeunload ' event

              Thanks!

              Martin Honnen wrote:
              [color=blue]
              > Marcia Gulesian wrote:
              >[color=green]
              > > 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.[/color]
              >
              > Well check the documentation, here it is:
              > http://msdn.microsoft.com/library/de...foreunload.asp
              >
              > --
              >
              > Martin Honnen
              > http://JavaScript.FAQTs.com/[/color]

              Comment

              Working...