N
N
Newn2018-05-11 16:49:45
AJAX
Newn, 2018-05-11 16:49:45

How to display a message on page close and execute ajax function?

Good afternoon. There is a page, when updating or closing a message should be displayed. If the person agrees with the close or refresh option, the ajax function must be executed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergiu Mitu, 2018-05-11
@EaGames

As far as I know, no way . you cannot prevent the window from closing for security reasons.

I
Ivan, 2018-05-11
@LiguidCool

window.onbeforeunload

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question