DS Server

Javascript: ToolbarButton.onclick Property

Property

Description

Click callback, or `null` when no action is assigned.

Syntax

<function> ToolbarButton.onclick

Examples

The following example demonstrates toolbarbutton.onclick in a practical Document Viewer workflow. Sets an onclick event-handler method for handling click-actions on the button.

function configureApproveButton(toolbarButton) {
    toolbarButton.onclick = function() { console.log("Document approved."); };
    console.log("Approve button onclick:", toolbarButton.onclick);
}