468,791 Members | 1,690 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,791 developers. It's quick & easy.

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 4721
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

Post your reply

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

Similar topics

1 post views Thread by Derek | last post: by
6 posts views Thread by jennyw | last post: by
5 posts views Thread by Verde | last post: by
2 posts views Thread by John Kotuby | last post: by
4 posts views Thread by Morgan Cheng | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.