windowHDInvokeButton Method
This method invokes the 'OnClick' function for one of the toolbar or navigation bar buttons (either built-in or custom), even if the button has been hidden. For example, if you create your own "Finish" button, you may want to hide the built-in "Finish" button but still have your custom button perform the same action by invoking the 'OnClick' function for the hidden "Finish" button.

JavaScript API: Direct
Assembly: api.js Version: 1.0.0.0 (1.0.0.0)
Syntax

JavaScript
function HDInvokeButton(buttonId);

Parameters

buttonId
Type: string
This is the button's unique identifier. See Remarks for list of built-in interview buttons, or supply a custom button ID as returned from the HDAPI.AddCustomNavButton or HDAPI.AddCustomToolbarButton methods.
Remarks

InvokeButton cannot be called in cases where the interview is not available for user interaction, such as when HDAPI.ServerResponseVisible returns true.

The following built-in button IDs can be provided for the buttonId parameter:

Button IDDescription
HDNextPage Performs the same action as the Next Dialog button on the navigation bar.
HDPrevPage Performs the same action as the Previous Dialog button on the navigation bar.
HDFirstPage Performs the same action as the First Dialog button on the navigation bar.
HDLastPage Performs the same action as the Last Dialog button on the navigation bar.
HDFinish Performs the same action as the Finish button on the navigation bar.
HDNextUnans Performs the same action as the Next Unanswered button on the navigation bar.
HDPrevUnans Performs the same action as the Previous Unanswered button on the navigation bar.
HDAnsSummary Performs the same action as the Answer Summary button on the interview toolbar.
HDSaveAnswers Performs the same action as the Save Answers button on the interview toolbar.
HDOutlineToggle Performs the same action as the Interview Outline Toggle button on the interview toolbar.
HDInstUpdateToggle Performs the same action as the Instant Update Toggle button on the interview toolbar. (HotDocs Server 10 interviews only.)
HDSinglePageToggle Performs the same action as the Single Page Interview Toggle button on the interview toolbar.
HDResourcePaneToggle Performs the same action as the Resource Pane Toggle button on the interview toolbar.
HDHelp Performs the same action as the Help button on the interview toolbar.
HDDocPreview Performs the same action as the Document Preview button on the interview toolbar.
HDReturnToInterview Performs the same action as the Return to Interview button that appears on answer summaries, document previews, etc.. That is, it closes the popup and returns the user to the main interview.

See Also

Reference