Howdy

If this is obvious - please excuse me...

This the the JS

The form is processed - backside php works
but this but does not do what I want...what am I missing?


$(document).ready(function() {
$("#loginForm").validate({
errorLabelContainer: "#errorMessage",
wrapper: "li",
rules: {
username: "required",
password: "required"
},
messages: {
username: "Please enter your username.",
password: "Please enter your password."
},
submitHandler: function(form) {
$.ajax ({
type: 'post',
url: 'auth_user.php',
dataType: 'json',
success: function(json) {
if(json.error === true) {
$("#errorMessage").text = json.msg;
} else {
$(location).attr('href',json.url);
}

},
});
}
});
false;
});