Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnBlur vs. OnChange

Status
Not open for further replies.

jerjim

Programmer
Jan 4, 2001
85
PH
When do you use OnBlur and when do you use OnChange?

Thanks in advance.
 
onBlur - the handler invoked when a form element loses focus

onChange - the handler invoked when a form element's value changes


 
OnBlur deals with the item loosing focus. Example would be having the cursor in a text box (has the focus) and then clicking something else or moving focus to something else which would fire the OnBlur event.

OnChange deals with changing something about the time. Example would be to put a space, character, or number in a text box. Or to change the selection in a drop down box.

I hope this helps a little. //**********************************//
Mithrilhall a.k.a. Shadowblades
//**********************************//
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top