Killing browser event...

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

    Killing browser event...

    i have a popup window and need to execute a script of mine right before
    closing.

    i tried something like: onUnload='doit( );' and nothing gets called when the
    user clicks
    on the X (kill) button on the browser

    can someone help ?

    thanks


  • Lasse Reichstein Nielsen

    #2
    Re: Killing browser event...

    "Mel" <mel@redolive.c om> writes:
    [color=blue]
    > i have a popup window and need to execute a script of mine right before
    > closing.[/color]

    There is not way to do that consistently across browsers.
    [color=blue]
    > i tried something like: onUnload='doit( );' and nothing gets called
    > when the user clicks on the X (kill) button on the browser[/color]

    Exactly.
    [color=blue]
    > can someone help ?[/color]

    In IE, you can use the "onbeforeunload " handler. That is called
    *before* the window is closed, and can even request that the
    closing is cancelled (although the user has the final word).

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...