472,985 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,985 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 4941
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.