Trapping refresh / reload

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tipu Sattar

    #1

    Trapping refresh / reload

    Does anyone know how the refresh is trapped at www.nwolb.com. It seems
    to trap the refresh, using F5 key as well as the reload button, and
    gives the user a pop to allow them to continue or cancel the event.

    I've looked at the source code and it does not seem to be in there. I
    also know that they only support IE - so is/ could it be IE specific?

    Thanks
    T
  • Mike

    #2
    Re: Trapping refresh / reload

    IE supports the onBeforeUnload event
    http://msdn.microsoft.com/workshop/a...foreunload.asp.
    This event is fired before the onUnload event allowing the code to prompt
    the user to make sure they want to leave. Mozilla 1.7 now supports the
    onBeforeUnload event http://mozilla.org/releases/mozilla1.7rc1/README.html
    but who knws how long it will be before Netscape switches to the new version
    of Mozilla.



    "Tipu Sattar" <tipusattar@hot mail.com> wrote in message
    news:8f4c7010.0 404290344.5f0f2 86d@posting.goo gle.com...[color=blue]
    > Does anyone know how the refresh is trapped at www.nwolb.com. It seems
    > to trap the refresh, using F5 key as well as the reload button, and
    > gives the user a pop to allow them to continue or cancel the event.
    >
    > I've looked at the source code and it does not seem to be in there. I
    > also know that they only support IE - so is/ could it be IE specific?
    >
    > Thanks
    > T[/color]


    Comment

    • Grant Wagner

      #3
      Re: Trapping refresh / reload

      Mike wrote:
      [color=blue]
      > IE supports the onBeforeUnload event
      > http://msdn.microsoft.com/workshop/a...foreunload.asp.
      > This event is fired before the onUnload event allowing the code to prompt
      > the user to make sure they want to leave. Mozilla 1.7 now supports the
      > onBeforeUnload event http://mozilla.org/releases/mozilla1.7rc1/README.html
      > but who knws how long it will be before Netscape switches to the new version
      > of Mozilla.[/color]

      <url: http://www.theinquirer.net/?article=15045 />

      Choose to believe it or not. I'm not sure it matters. Leaving an update to Netscape 7.1
      for so long with 7.1 based on a buggy Mozilla core has done a significant amount of
      damage to Netscape's reputation.

      --
      | Grant Wagner <gwagner@agrico reunited.com>

      * Client-side Javascript and Netscape 4 DOM Reference available at:
      * http://devedge.netscape.com/library/...ce/frames.html
      * Internet Explorer DOM Reference available at:
      * http://msdn.microsoft.com/workshop/a...ence_entry.asp
      * Netscape 6/7 DOM Reference available at:
      * http://www.mozilla.org/docs/dom/domref/
      * Tips for upgrading JavaScript for Netscape 7 / Mozilla
      * http://www.mozilla.org/docs/web-deve...upgrade_2.html


      Comment

      Working...