OnBeforeUpdate being triggered by asynchronous events.

Discussion in 'ASP .Net' started by Microsoft Newsserver, Jun 24, 2008.

  1. Hi,

    I am running 2005, 2.0, Ajax. Extensions.

    I needed to run some client side code before allowing the window to close
    ( IE window still visible ), so i used the onbeforeupdate event of the
    window. This works ok, however, I have noticed that any asynchronous
    trigger also causes this event to fire.

    Any ideas on how to solve this problem.

    So to paraphrase this. I need to intercept the user closing the window . run
    my code with the window still visible and then allow it to close.

    Thanks in advance....
     
    Microsoft Newsserver, Jun 24, 2008
    #1
    1. Advertising

  2. sorry : was onbeforeunload


    "Microsoft Newsserver" <> wrote in message
    news:...
    > Hi,
    >
    > I am running 2005, 2.0, Ajax. Extensions.
    >
    > I needed to run some client side code before allowing the window to close
    > ( IE window still visible ), so i used the onbeforeupdate event of the
    > window. This works ok, however, I have noticed that any asynchronous
    > trigger also causes this event to fire.
    >
    > Any ideas on how to solve this problem.
    >
    > So to paraphrase this. I need to intercept the user closing the window .
    > run my code with the window still visible and then allow it to close.
    >
    > Thanks in advance....
    >
     
    Microsoft Newsserver, Jun 24, 2008
    #2
    1. Advertising

  3. Microsoft Newsserver

    bruce barker Guest

    onbeforeunload fires every time the document is unloaded (every page flip).
    you need to write code that sets a variable that a psotback has started, so
    your unload routine can detect it in a postback.

    -- bruce (sqlwork.com)


    "Microsoft Newsserver" wrote:

    > sorry : was onbeforeunload
    >
    >
    > "Microsoft Newsserver" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I am running 2005, 2.0, Ajax. Extensions.
    > >
    > > I needed to run some client side code before allowing the window to close
    > > ( IE window still visible ), so i used the onbeforeupdate event of the
    > > window. This works ok, however, I have noticed that any asynchronous
    > > trigger also causes this event to fire.
    > >
    > > Any ideas on how to solve this problem.
    > >
    > > So to paraphrase this. I need to intercept the user closing the window .
    > > run my code with the window still visible and then allow it to close.
    > >
    > > Thanks in advance....
    > >

    >
    >
    >
     
    bruce barker, Jun 24, 2008
    #3
  4. Microsoft Newsserver

    Rain Guest

    Interesting thought there Bruce..

    Any idea how to trap all postback requests ?. Actually, I may know how to do
    this, thanks for the thought, im going to look at it.


    Cheers




    "bruce barker" <> wrote in message
    news:...
    > onbeforeunload fires every time the document is unloaded (every page
    > flip).
    > you need to write code that sets a variable that a psotback has started,
    > so
    > your unload routine can detect it in a postback.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Microsoft Newsserver" wrote:
    >
    >> sorry : was onbeforeunload
    >>
    >>
    >> "Microsoft Newsserver" <> wrote in message
    >> news:...
    >> > Hi,
    >> >
    >> > I am running 2005, 2.0, Ajax. Extensions.
    >> >
    >> > I needed to run some client side code before allowing the window to
    >> > close
    >> > ( IE window still visible ), so i used the onbeforeupdate event of the
    >> > window. This works ok, however, I have noticed that any asynchronous
    >> > trigger also causes this event to fire.
    >> >
    >> > Any ideas on how to solve this problem.
    >> >
    >> > So to paraphrase this. I need to intercept the user closing the window
    >> > .
    >> > run my code with the window still visible and then allow it to close.
    >> >
    >> > Thanks in advance....
    >> >

    >>
    >>
    >>
     
    Rain, Jun 24, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    396
    Joerg Jooss
    Feb 9, 2006
  2. Morten Wennevik
    Replies:
    4
    Views:
    1,841
    =?Utf-8?B?RWx0b24gVw==?=
    Mar 10, 2006
  3. =?Utf-8?B?RGFiYmxlcg==?=

    validators messing up layout in IE before being triggered?

    =?Utf-8?B?RGFiYmxlcg==?=, Apr 11, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    647
    Swanand Mokashi
    Apr 12, 2006
  4. thebad1
    Replies:
    9
    Views:
    396
    Patricia Shanahan
    Jan 12, 2007
  5. James
    Replies:
    1
    Views:
    158
    James
    Mar 17, 2006
Loading...

Share This Page