I want to run a validation function after a user enters data. If the validation fails, I want do an alert telling them so and set the focus back to that field. But even at the most basic level, I can't get the focus to stay / go back to the field that was changed. Interesting that it does seem to work in IE 7, but not FF.
$(document).ready(function(){ $('#testField').change(function() { alert('wrong value'); this.focus(); }); }); Any ideas here? Or suggestions on how to reset focus back to the field that changed? Thanks, Matt