OnBeforeUnload error in IE 11

jokohono 61 Reputation points
2022-01-17T10:34:42.8+00:00

Hi All,

I discovered that when I use the onbeforeunload javascript method, no custom error message can be displayed in IE11.
Is that a feasible method of archiving this section?
Secondly, is there a way to trigger ajax when the user presses leave during the onbeforeunload javascript method's pop-up?

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,238 questions
0 comments No comments
{count} votes

Accepted answer
  1. Meng Yang Liu 911 Reputation points
    2022-01-17T11:07:34.843+00:00

    Please refer to the following paragraph, hope this help:

    In older browsers, the return value of the event is displayed in this dialog. Starting with Firefox 44, Chrome 51, Opera 38, and Safari 9.1, a generic string not under the control of the webpage will be shown instead of the returned string.

    Link: https://www.w3schools.com/jsref/event_onbeforeunload.asp

    0 comments No comments

0 additional answers

Sort by: Most helpful