onKeyup event used instead of onchange