Search code examples
ajaxprototypejs

Event.observe field active? (prototype.js)


Is it possible to observe an input field and only do an action when a field is no longer the active field? (i.e. when the user clicks on another input field?)


Solution

  • Yes, you're looking for the 'blur' event. Here's a similar question/answer: How to capture form's fields focus lost event in prototypejs