Entering text in textbox would not trigger Javascript changes