P.S.: Read \"EDITED on 2019-06-29\":
I have a webform for updating user information, and when he updates his email a verification is performed via
Seems like you don't realy get the idea jQuery. You don't need to use return false, and not there. You can call event.preventDefault();
:
$('#form').submit(function(event) {
$.get('/ajax/verify-email.php?email=' + $('#email').val(), function(d) {
if (d == '1') {
alert('Another user is using this email');
$('#email').focus();
}
});
event.preventDefault();
});
See this example.