473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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....
Jun 27 '08 #1
3 1075
sorry : was onbeforeunload
"Microsoft Newsserver" <me@nowhere.comwrote in message
news:ed**************@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....

Jun 27 '08 #2
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.comwrote in message
news:ed**************@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....


Jun 27 '08 #3
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" <br*********@discussions.microsoft.comwrote in message
news:16**********************************@microsof t.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.comwrote in message
news:ed**************@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....



Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: wobbles | last post by:
Hi Everyone (Happy New Year!), If I have clients that want to tell the server that something has happened, what would be the difference between "remoting events" and using an asynchronous (one...
3
by: Matthew King | last post by:
Hi all I've written a asynchronous socket client class, but i've found that in order to consume it I have to use events, and cannot simply for example SocketClient client = new...
2
by: Gerda | last post by:
Hi! I've implemented many times an asynchronous call of a method with a call backfunction successfully. But to implement this with VB.NET is not so successfully. I can implement all events...
2
by: TrtnJohn | last post by:
I have a multi-threaded class that I am creating that needs needs to raise events when certain asynchronous events occur. I would always like the events to be raised to the primary UI thread of...
5
by: Paal Berggreen | last post by:
I am involved with development of a Portal solution using ASP.NET 2.0 and WebParts. The WebParts framework use the default personalization providers, and the personalization data thus ends up in...
1
by: Abel Chan | last post by:
Hi there, I was trying to write a simple NT services using .NET 2.0 and fileSystemWatcher control. The goal is to poll documents from a watch directory and ftp them to a remote web site. I...
5
by: Ryan Liu | last post by:
Hi, I read Microsoft SDK, ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpovrasynchronousprogramming overview.htm there are 4 ways to call EndInvoke: The code in this topic demonstrates...
1
by: slikrik98 | last post by:
Greetings, I believe I have narrowed down my issues to one simple question, and I'm hoping someone with async events experience can help me out. My question is: how is using...
8
by: Rex the Strange | last post by:
Hello All, I don't know if this is possible, but I'll give it a shot, here. I'm sick of writing the following line of code in control event handlers: if not visible then exit sub Is it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.