I want to get signal of it. Because I am creating face recognition add-on (like master password) for firefox.
edit: when user add username I need to check user face. If only the given username and his saved face are equal, then only password should put in to password field. What I want is when user add his username execute my application to recognize face. I want to get signal of after adding username.
The basic naive solution is to add an event listener on all text input
elements and listen for any event that suits your needs, particularly interesting in your case should be focus
, blur
, or maybe input
events. There's also the element.onchange
property that might get handy.
Typical usage (simplified logic):
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
inputs[i].onchange = yourFunctionToCall;
}
Some additional notes:
<input type="password" />
element.