That's a good approach for usability but it does halve the keyspace for anyone attempting a brute force attack. It might not be appropriate everywhere.
I think he means doing it on the server, i.e. checking the password as-is, if that doesn't work, then check it with case inverted.
This is important because if you want to decode a hashed password using a rainbow table for example, you still have to hash the entire keyspace, not just half of it.
Edit @sp332: Exactly. That was my point.
For n character alphabetic values, it reduces the keyspace from 52^n to 26^n.
var caps = null;
passwordField.onkeypress = function(e) {
if (caps !== false) {
var s = String.fromCharCode(e.keyCode || e.which);
caps = s.toUpperCase() == s && !e.shiftKey;
}
};
loginForm.onsubmit = function(e) {
if (caps) {
passwordField.value = invertCase(passwordField.value);
}
};