Answer the question
In order to leave comments, you need to log in
FireFox - how to cancel page exit warning?
There was a problem in Firefox.
There is a form, sending occurs via ajax without using .submit () i.e. when clicking on a specific button. an ajax request is executed, after which a redirect can be performed.
So, before performing the redirect, FireFox asks:
This page asks you to confirm that you want to leave - the data you entered may not be saved.
Answer the question
In order to leave comments, you need to log in
how is the redirect done? and where does it lead - in the same domain or somewhere to the side?
If you do not need submit via form, then remove it altogether, leave only the fields (input, etc.), it should help.
I work with almost all forms through ajax, I have not seen such a problem.
And by the way, in your case it's more convenient to use $.post:
$.post(url, data, function(data){
/*success here*/
}, 'json');
Thank you, if the problem was exactly in the form (as I originally assumed), then your solution would help. I just thought that .serialize() only works for forms, because. the documentation only talks about them api.jquery.com/serialize/ , but now I googled it and it turned out that everything can be applied, sort of.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question