Parameter | Description |
---|---|
bIsInsert | Indicates if the input inserted data into the value |
sInputType | String indicating the cause of the input |
Procedure OnInput Boolean bIsInsert String sInputType
Event hook that is called after every user change of the form value.
It is based on the input DOM event. The value change can be caused by a keypress but also by other methods like voice input.
psValue will already be updated when this procedure is called.
The sInputType parameter indicates the cause of the event (see https://www.w3.org/TR/input-events-1/#interface-InputEvent-Attributes for possible values).
Note that not all keypress events trigger an OnInput event (only if the value changes) so to handle specific keypress events use the OnKey event.
The example code below shows how to implement the OnInput and log the calls inside a cWebHtmlBox:
Object oForm is a cWebForm Set piColumnSpan to 0 Set psLabel to "Type here:" Set pbServerOnInput to True Procedure OnInput Boolean bIsInsert String sInputType Send PrependHtml of oDebugKeys (SFormat("OnInput (bIsInsert: <b>%1</b>, sInputType: <b>'%2'</b>)<br>", bIsInsert, sInputType)) End_Procedure End_Object Object oDebugKeys is a cWebHtmlBox Set piColumnSpan to 0 Set psHtml to "" Set pbFillHeight to True Set pbScroll to True End_Object