Raise Different Events If A Textbox Is Focused Or Not
I'm working on this page: How it works: the 'Consultar' button searches for the code in the 'Código' textbox and reloads the page. The 'Salvar' button calls a routine to save wha
Solution 1:
Bind an event handler to the keypress event on your document and then check if the input field is focused. If so, you can submit your search form, otherwise you continue with your saving logic.
See this fiddle to see it in action: http://jsfiddle.net/KkJ2t/
Post a Comment for "Raise Different Events If A Textbox Is Focused Or Not"