Detecting Change Before Blur
I have added "keyup" as a second event for the calculation to be performed, which covers many cases of user input. However, this is still not perfect, because the user could paste a value into the box or change the value in some other way (i.e. clicking the up and down arrows on compatible browsers).
Is there an event that fires whenever the value in the input changes, regardless of the focus of the input? Is there some other way to work around this problem? It seems like this would be the kind of thing that would have a thousand hits on Google, but I can't seem to find anything.
document.getElementById("wm_buy_amt_input").addEventListener("keyup", wbCalculateOther, false);
document.getElementById("wm_buy_amt_input").addEventListener("change", wbCalculateOther, false);
<input type="number" value="0" min="0" id="wm_buy_amt_input" />