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();
try this
var elUsername = $('#usernameInput').val();
Instead of
var elUsername = $('#usernameInput').value;
You're trying to use a native JavaScript property on a jQuery object. Use :
var elUsername = $('#usernameInput').val();
or
var elUsername = document.getElementById('usernameInput').value;
or the slightly less obvious, but still valid:
var elUsername = $('#usernameInput')[0].value;
var elUsername = $('#usernameInput').get(0).value;