I am having trouble with trying to check the length of a field and set a value based on the result. Using firebug with firefox I keep getting the error \'elUsername\' is not def
try this
var elUsername = $('#usernameInput').val();
Instead of
var elUsername = $('#usernameInput').value;