U7 redirect on login validation failure (Login Partial code snippet)
Hi all,
I am just getting started with MVC so be gentle.
I am trying to redirect members to a different login page if the login from the navbar fails. I am using the login code snippet for a Partial View (with minor stylistic modifications)
I have given the form an 'id' and I can hook into the jQuery invalid-form event as such
$('#loginForm').bind('invalid-form.validate', function (e) {
e.preventDefault();
window.location.href = "/login/"
});
and that works if one of the fields is invalid, but not for a failed login attempt. How do I listen for a failed login attempt and then redirect when that happens?
U7 redirect on login validation failure (Login Partial code snippet)
Hi all,
I am just getting started with MVC so be gentle.
I am trying to redirect members to a different login page if the login from the navbar fails. I am using the login code snippet for a Partial View (with minor stylistic modifications)
I have given the form an 'id' and I can hook into the jQuery invalid-form event as such
and that works if one of the fields is invalid, but not for a failed login attempt. How do I listen for a failed login attempt and then redirect when that happens?
Thanks!
is working on a reply...