In IE, if the window.onbeforeunload function returns a null, it will still pop up an alert window. How do I prevent this from happening?
Asked
Active
Viewed 93 times
0
-
Don't return anything at all. Presumably, `return;` or `return undefined;` would work, but I usually just have it end the function without a `return` statement. – gen_Eric Mar 21 '14 at 20:40
1 Answers
0
If it's anything (including a function that returns null) IE will still show the dialog.
In IE you have to clear the function entirely.
See this answer for more detail.