Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   OnBeforeUpdate being triggered by asynchronous events. (http://www.velocityreviews.com/forums/t621955-onbeforeupdate-being-triggered-by-asynchronous-events.html)

Microsoft Newsserver 06-24-2008 09:29 AM

OnBeforeUpdate being triggered by asynchronous events.
 
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 06-24-2008 09:40 AM

Re: OnBeforeUpdate being triggered by asynchronous events.
 
sorry : was onbeforeunload


"Microsoft Newsserver" <me@nowhere.com> wrote in message
news:edAMxzd1IHA.2084@TK2MSFTNGP06.phx.gbl...
> 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 06-24-2008 03:22 PM

Re: OnBeforeUpdate being triggered by asynchronous events.
 
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" <me@nowhere.com> wrote in message
> news:edAMxzd1IHA.2084@TK2MSFTNGP06.phx.gbl...
> > 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 06-24-2008 06:27 PM

Re: OnBeforeUpdate being triggered by asynchronous events.
 
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" <brucebarker@discussions.microsoft.com> wrote in message
news:161AABA5-D101-4789-96B2-44699B1F10BE@microsoft.com...
> 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" <me@nowhere.com> wrote in message
>> news:edAMxzd1IHA.2084@TK2MSFTNGP06.phx.gbl...
>> > 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....
>> >

>>
>>
>>





All times are GMT. The time now is 01:27 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.