OnBeforeUpdate being triggered by asynchronous events.

  • Thread starter Thread starter Microsoft Newsserver
  • Start date Start date
M

Microsoft Newsserver

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....
 
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)
 
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
 
Back
Top