OnBeforeUpdate being triggered by asynchronous events.

  • Thread starter Microsoft Newsserver
  • 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....
 
B

bruce barker

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)
 
R

Rain

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top