ValidationSettingsDialog.getOkButtonClicked

Syntax

getOkButtonClicked();

Description

The getOkButtonClicked method determines whether OK button has been clicked in the dialog box used to edit workbook data validation rule.

Comments

This method returns True if OK button has been clicked in the dialog box, otherwise it returns False.

Example

Executing this example requires the ValidationSettingsDialog component named validationSettingsDialog (see Example of creating the ValidationSettingsDialog component). Check if the OK button in this dialog box has been clicked:

// Determine whether the OK button is clicked
var isOkButtonClicked = validationSettingsDialog.getOkButtonClicked();
if (isOkButtonClicked) {
    console.log("The OK button is clicked.");
} else {
    console.log("The OK button is not clicked.");
}

After executing the example the browser console displays the following message:

OK button has not been clicked.
 

Now specify validation rule name and click OK. Another message is shown when the example given above is executed for the second time:

OK button has been clicking.

See also:

ValidationSettingsDialog