I have a form that I would like all fields to be filled in. If a field is clicked into and then not filled out, I would like to display a red background.
The keyup event will detect if the user has cleared the box as well (i.e. backspace raises the event but backspace does not raise the keypress event in IE)
$("#inputname").keyup(function() {
if (!this.value) {
alert('The box is empty');
}});