How to use onBlur()
posted 15 years ago
onBlur is usually used for field validation, or updating dependent fields. Imagine a form with three text fields and a total. While you are editing one of the fields, you don't want the total to change, but you don't want to have to press a button to update it either. So set the onBlur() handler of each of the input fields to a method which updates the total. Now whenever you move out of a field, th etotal will be updated.