Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

windows.onbeforeunload not consistently firing...

Avatar of davism
davismFlag for United States of America asked on
JavaScriptASP.NET
17 Comments1 Solution1424 ViewsLast Modified:
Hi all,

I have a question that maybe I'm missing something.

I have a masterpage and in it I have a window.onbeforeunload={some confirmation function}.

Then in the content page I have a window.onbeforeunload={some other confirmation function};

Now, the problem I am having is consistency; in some cases I can repeatedly get the confirmation information and in some cases (only data differences) I do not get the prompt.

I even changed it to something like this: window.onbeforeunload = alert('firing');confirmExit;

On the situations cases where I do not get the prompt I obviously do not get the alert and otherwise I do.

The fact of not getting the alert indicates that it is not firing. What would cause something like that?

Just an FYI--> I am using something very similar to this: http://aspnet.4guysfromrolla.com/articles/101304-1.aspx

Any information would be greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971Flag of Guadeloupe imageMultitechnician
Commented:
This problem has been solved!
Unlock 1 Answer and 17 Comments.
See Answers