[jQuery] (validate) How do I raiz error/
I have a login form
Only in Js it works fine, but I have more checks that I am doing in my
PHP file...
How di I raiz error according to ajax responce code?
var v = jQuery("#login_frm").validate({
submitHandler: function(form) {
jQuery(form).ajaxSubmit({
target: "#result",
success: showResponse
});
}
});
function showResponse(responseText, statusText) {
var intValue = parseInt(responseText)
if (intValue>0){
alert("OK");
window.locaiton.href = "index.php";
} else if (intValue == -1) {
alert("not ok");
rules()
} else if (intValue == -2) {
} else if (intValue == -3) {
} else if (intValue == -4) {
} else if (intValue == -5) {
}
alert('status: ' + statusText + '\n\nresponseText: \n' +
responseText );
}