Reference Guide
Reference Guides / JavaScript API / Actions / Interface / DisplayMessageBox
In This Topic
    DisplayMessageBox
    In This Topic
     DisplayMessageBox

    This function allows you to display a custom message to a specific DocuVieware™ control.

    DisplayMessageBox: function (docuViewareID, message)

    Parameters

    docuViewareID
    The identifier for the DocuVieware™ instance you want to display the message in.
    message
    A JavaScript object that represents the message you want to display. This object has mandatory properties as well as optional properties. Mandatory properties are "text" and "icon".
    Text can be any string (both raw text and HTML content are allowed, default being raw text, HTML content requires the property "isHtmlText" to be set to true). Icon is an integer value that represents the message type you need to send, values are: 16 for error, 32 for question, 48 for warning, 64 for information and 128 for success.
    Optional properties are as follow:
    • backgroundColor: string, default is null, in this case HeaderColor will be used
    • delay: integer, default is 2500 milliseconds except for error message where it is 5000
    • fontColor: string, default is "#FFFFFF"
    • fontSize: string, default is "130%"
    • fontWeight: string, default is "normal"
    • isHtmlText: bool, default is false
    • messageBoxHeight: string, default "48px"
    • slideDownDelay: integer, default is 300
    • slideUpDelay: integer, default is 300
    • textDecoration: string, default is "none"
    • textTransform: string, default is "none"
    DocuViewareAPI.DisplayMessageBox("DocuVieware1", {
       text: "This is a question, is it working?",
       icon: 32
    });

    Return Value

    1 if error, 0 if success.