TextBox.AfterChange

Syntax

AfterChange: function(sender, args, timeout);

Parameters

sender. Event source.

args. Event information.

timeout. Time delay (milliseconds) after which the event is fired.

Description

The AfterChange event occurs after text field editing is finished.

Example

To execute the example, the page must contain the TextBox component named textBox (see Example of Creating the TextBox Component). Handle the following event: BeforeChange, AfterChange, AfterTimeout, TextChanged, and Enter, allow text box editing and change text box contents:

// Enable text box editing
textBox.setEnableEdit(true);
// Handle the BeforeChange event
textBox.BeforeChange.add(function (sender, args, timeout) {
    console.log("The BeforeChange event is initiated")
});
// Handle the AfterChange event
textBox.AfterChange.add(function (sender, args, timeout) {
    console.log("The AfterChange event is initiated")
});
// Handle the AfterTimeout event
textBox.AfterTimeout.add(function (sender, args, timeout) {
    console.log("The AfterTimeout event is initiated")
});
// Handle the TextChanged event
textBox.TextChanged.add(function (sender, args, timeout) {
    console.log("The TextChanged event is initiated")
});
// Handle the Enter event
textBox.Enter.add(function (sender, args, timeout) {
    console.log("The Enter event is initiated")
});
// Handle the ValueChanged event
textBox.ValueChanged.add(function (sender, args, timeout) {
    console.log("The ValueChanged event is initialized");
}); // Change the text of the text box textBox.setContent("Text box");

After executing the example, the browser console displays messages informing that the handled events are fired:

The BeforeChange event is initialized

The TextChanged event is initialized

The AfterChange event is initialized

The ValueChanged event is initialized

PP.Ui.TextBox {_Events: Object, ImageMouseUp: PP.Delegate, ImageMouseDown: PP.Delegate, ImageClick: PP.Delegate, Focus: PP.Delegate…}

The AfterTimeout event is initialized
 

After clicking on the text box and pressing the ENTER key, a message informing that the Enter event is fired is displayed:

Enter event initialized

TextBox