disable delete key on keyboard - InfoPath Dev
in

InfoPath Dev

disable delete key on keyboard

Last post 11-01-2005 02:54 PM by franck. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-31-2005 08:11 PM

    disable delete key on keyboard

    Hi

    is there a way to disable the delete key on keyboard. I have coded a delete button on my form which does some stuff behind the scenes. but pressing the delete skips all of the code ive written.

    regards
  • 10-31-2005 10:35 PM In reply to

    Re: disable delete key on keyboard

    Hi,

    If you just want to find out if a textbox was cleared with Backspace or Del or if 1 character was removed, maybe you can use the OnAfterChange event and compare the OldValue to the NewValue of the event. If it is more complex logic, you may have to build your own ActiveX control.

    Regards,

    Franck Dauché
  • 11-01-2005 01:23 PM In reply to

    Re: disable delete key on keyboard

    Thanks for response

    Im interested to know exactly in js, how would you go about comparing the oldvalue agains the newvalue of an event?
  • 11-01-2005 02:54 PM In reply to

    Re: disable delete key on keyboard

    OK, if you get to the OnBeforeChange event associated with a textbox (right-click / data validation event).
    In the body of the code. Type e. the intellisense will show you NewValue and OldValue. That where you can catch changes, cancel the update is needed etc.
    In your case, you would see if 1 or more characters were dropped.

    Hope that it helps.

    Regards,

    Franck Dauché
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.