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
Change those variables to this:
var elUsername = $('#usernameInput').val();