You can use onchange, but usually it will not be projected until the field loses focus. There is also onkeyupwhich you want to use if you want immediate new text.
Can you control the window filling the text box? If so, your best route, since it is the source of the event, just calls the third control group from there using the function on the parent page.
If there are no numerical effects, you can bind the event to onchange, onclickand onkeyupto handle all cases, it will work a little longer, but if it is an easy operation, without reusable side effects, and you want to cover your bases, this is a viable option.
source
share