I\'m finally at the point of testing my site in other browsers (built it mostly in Chrome). Unfortunately, a lot of stuff seems to function differently. I\'ll begin with the v
I'd suggest preventing the event to begin with, then when you want the form to submit, do it with the native submit method since it bypasses jQuery.
var form = document.getElementById("formid");
$(form).submit(function(e){
e.preventDefault();
$.ajax({
type: "POST",
url: "check_login.php",
data: {
'username': username,
'password': password
},
//async: false,
success: function (result) {
if (result == 1) {
$('#loginoff').html("Invalid username/password");
} else {
$('#loginoff').html("");
form.submit(); // note, form is a form NODE, not a jQuery object containing a form.
}
}
});
});
this also allows you to remove async: false
which is ALWAYS a good thing(other than within webworkers.)