A
A
Alexander Alexandrovich2017-11-30 21:48:54
AJAX
Alexander Alexandrovich, 2017-11-30 21:48:54

How to remove the warning when switching to another page after filling out a form?

There is a form.
I send data from it not by action but by ajax.
After all the data has been processed and I got the callback, I plan to redirect to another page using
window.location.href = 'another page';
But the browser (chrome in this case, and others too), displays a warning that you want to go to another page and the data entered in the form may be lost.
How to get rid of this warning and go to another page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2017-11-30
@Taraflex

https://developer.mozilla.org/en/docs/Web/API/HTML...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question