It is hard to say without knowing your code. My best guess is that the onchange
event is not firing when you change your textbox value from JavaScript code.
There are two ways for this to work; the first is to call onchange
by yourself, and the second is to wait for the textbox to lose focus.
Check this question; same issue, different framework.