===== alert ===== .. js:function:: alert(mess, options) **domain**: client **language**: javascript **class** :doc:`AbstractItem ` Description =========== Use the ``alert`` method to create a pop-up message in the upper-right corner application that disappears after the first click on the page. The ``mess`` parameter specifies the text that will be displayed. The ``options`` parameter is an object with the following attributes: * ``type`` - indicates the type of the message - its font, background color and header text, if it is not specified in the header parameters. This must be one of the following: * 'info', * 'error', * 'success' default value is 'info' * ``header`` - specifies the header of the alert * ``pulsate`` - if true, the header will pulsate, the default value is true * ``show_header`` - if false, the header will not be displayed. The methods ``alert_error`` and ``alert_success`` are the same as ``alert`` with the corresponding ``type`` options. Example ======= .. code-block:: js item.alert_error('Failed to send the mail: ' + err); item.alert('Successfully sent the mail');