There is an input (invisible). When text entry begins, the capress event causes a focus event on the input, into which everything that is entered from the keyboard is transmitted. then the variable "value_input" gets the value from the ipput and is compared with the base.
The problem is that all this is triggered by a capres event, that is, for example, if someone enters eight characters, there will be eight checks in the database. And you need to do just one check. That is, you need to know that input to the input is complete, and then start the check.
How do I know that input to the input is complete, and then perform just one check?
Suppose that in order to find out that the input is complete, I wrote a function, but then the problem is: how to call this function?
If the check function is called at each event by a capress, then it is not suitable, it is necessary only at the first one.
How to implement it correctly?
keyupand not thekeypress....... can still bekeypress.. but there is no guarantee that the focus from thekeyupwill bekeyup- Alexey ShimanskysetTimeoutto check the input then - Alexey Shimansky