473,396 Members | 2,154 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,396 software developers and data experts.

IE: onbeforeunload event firing during asynchronous request

Frinavale
9,735 Expert Mod 8TB
I don't have a clue how to work around this problem and I'm open to any suggestions on the topic....

In Internet Explorer it appears that the onbeforeunload event is fireing despite the fact that it is not a full page postback to the server that is occurring.

This is causing a problem because I'm displaying a <div> that blocks the page's content during the onbeforeunload event (in order to be consistent with what happens when I block the controls and display a "processing message" during partial page, asynchronous requests).

The problem is that the control that is supposed to block the page during the full page request to the server (during the onbeforeunload event) is also being displayed when the partial page request to the server is being made (via an ASP.NET UpdatePanel).

When the Ajax Request returns, the control that was supposed to block the page during a full page unload remains showing...

I don't really want both of the controls to show at the same time and would like to prevent the one that is supposed to be only be displayed during full page requests from being displayed during asynchronous requests.


-Frinny
Apr 1 '10 #1

✓ answered by Frinavale

Well I figured out a way around this.

During Ajax requests I hide the control that is meant for the full post back during the begin and the end request events.

It's working now but I still find it crazy that the onbeforeunload event is fired during asynchronous requests.

-Frinny

1 4974
Frinavale
9,735 Expert Mod 8TB
Well I figured out a way around this.

During Ajax requests I hide the control that is meant for the full post back during the begin and the end request events.

It's working now but I still find it crazy that the onbeforeunload event is fired during asynchronous requests.

-Frinny
Apr 1 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Robert Oschler | last post by:
I have a web page where I want to make sure that an image HTTP request is successfully made before the page unloads. The request is made by setting the image element's SRC property to the desired...
1
by: Derek | last post by:
Hello: Can anybody tell me how to detect browser close event in Javascript and how to call a servlet on a Brower close? I tried some thing: <html> <SCRIPT LANGUAGE="JavaScript1.2"...
6
by: jennyw | last post by:
Hi, I'd like to use onbeforeunload to submit a form before leaving a page. This works in Firefox and IE. Safari, however, blithely ignores this. Does anyone know of a workaround for Safari? Or...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
5
by: Verde | last post by:
This is admittedly an apparently odd request... but please indulge me if you don't mind: Suppose I have two <asp:Button.../> on a page (Button1 and Button2). User clicks Button1 and triggers a...
14
by: TS | last post by:
I have this custom data list control and i override the onItemDatabound event. After upgrading to vs 2005, this event is not always getting called, though it does at other times. No changes were...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
4
by: Morgan Cheng | last post by:
Since ASP.NET 2.0, asynchronous web service client can be implemented with event-based pattern, instead of original BeginXXX/EndXXX pattern. However, I didn't find any material about event-based...
1
Frinavale
by: Frinavale | last post by:
Introduction I've seen many questions asked about how to disable the browser's back button and in the past I've replied with "it's simply not possible". It's not a good idea to disable the back...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.