Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.
All documentation
  • API Reference for older versions
  • alert

    alert(alertConfigs: Object)

    [starting from version: 2.6.5]

    This API call shows an alert pop-up window with a custom message.

    Parameters

    alertConfigs - the object that describes the alert pop-up. This object has the following properties:

    Property/TypeDescription
    title
    String
    The title of the pop-up.
    Default value: "".
    Note: either title or message is required to show the alert pop-up.
    message
    String
    The message of the pop-up.
    Default value: "".
    Note: either title or message is required to show the alert pop-up.
    type
    String
    optional The type of the pop-up window. Available types: "alert", "confirmation", "error", "info".
    Default type: "alert".
    buttons
    ButtonObject[]
    optional By default, theOK button is shown. buttons is used to set custom buttons. Each object in buttons represents one button in the pop-up window.
    blocking
    Boolean
    optional Defines whether the pop-up is blocking other actions until its button is clicked.
    Default value: false.

    ButtonObject

    Property/TypeDescription
    label
    String
    The label of the button.
    handler
    Function
    The function that handles clicks on this button.

    Example

    Show the pop-up:

    pivot.alert({
    title: "Error Title",
    message: "An error message",
    type: "error",
    buttons: [{
    label: "Button 1",
    handler: function() { console.log('Button 1 handler'); }
    }, {
    label: "Button 2",
    handler: function() { console.log('Button 2 handler'); }
    }],
    blocking: false
    });

    Open the example on JSFiddle.

    See also

    All events