weixin_33738555 2016-05-06 13:21 采纳率: 0%
浏览 30

更敏感的“ OnTextChanged”…?

I am building a page where I want an update button that is hidden until such time as the user has altered some data on the page. Therefore my first thought was to simply on my text box to add 'OnTextChanged' and then throw a Visible=true to my update button and the user would be aware they hand information on the screen that needed to be saved before they left or they would otherwise loose it.

However, OnTextChanged doesn't trigger when you start adding data to the text box nor even when you leave the text box and go to another. In fact it doesn't trigger until you do something else on the page, then it fires and my button then appears and the update can be executed by clicking on the button.

I would MUCH rather have this triggered with the first additional character space or digit is added or removed from a textbox or element rather than wait for such an event as the only thing I intend to do with these trigger points is to activate the update buttons visibility so the user can update when they are ready to. The update routine then re-hides the button waiting for the next bit of data to change to re-light the button once again.

Anyone have any suggestions on how to get this to do what I'm wanting to do here? Just wanting a more sensitive OnTextChanged function.

Thanks, Ken...

  • 写回答

1条回答 默认 最新

  • weixin_33749242 2016-05-06 13:27
    关注

    Try to use the event onKeyPress. It should be triggered each time the user types a character in an input.

    Here you have more information

    评论

报告相同问题?

悬赏问题

  • ¥15 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!