windowHDAddCustomNavButton Method
This function adds a button to the interview navigation bar. When a user clicks the button, a JavaScript function is called that performs any action users may need to take while navigating through the interview.

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

JavaScript
function HDAddCustomNavButton(funcClick, funcEnabled, buttonType, buttonText, tooltip, imageName, navGroup, buttonIndex, separator);

Parameters

funcClick
Type: function
A Javascript function that should be called whenever the button is clicked. It should accept one parameter, which is the ID of the custom navigation button that was clicked.
funcEnabled
Type: function
A Javascript function that should be called to determine if the button is enabled or not. It should accept one parameter, which is the ID of the custom navigation button being checked. (Default: null, which means the button will always be enabled.)
buttonType
Type: number
The type of button to create:
  • 0=TextOnly
  • 1=ImageOnly
  • 2=ImageLeft (image to the left of the text)
  • 3=ImageRight
buttonText
Type: string
The text (if any) that should be displayed on the button.
tooltip
Type: string
The tooltip text for the button.
imageName
Type: string
The URL of an image (if any) for the button.
navGroup
Type: number
Indicates which navigation bar group the new button will be added to:
  • 0=Left
  • 1=Middle
  • 2=Right
buttonIndex
Type: number
The location within the navigation bar group where the new button will appear. If this is null, the button will be added to the end of the group.
separator
Type: number
Indicates whether or not a separator bar will be placed next to the new button:
  • 0=None
  • 1=Left
  • 2=Right
  • 3=Both

Return Value

Type: string
This function returns a button ID, which you can later use to invoke the button programmatically or to set the button's visibility.
Remarks

To use this function, place a call to AddCustomNavButton inside of your HDInterviewOptions.OnInit method.
See Also

Reference