Global Functions

The Legacy API exposes the following members.

Functions

  Name Description
Public method HDAddCustomNavButton
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.
Public method Code example HDAddCustomToolbarButton
This function adds a button to the interview toolbar. When a user clicks the button, a JavaScript function is called that performs any action you may wish to make available to users of your host application, such as displaying your host application's help file.
Public method HDAnsGetIter
This function returns a single number value that represents the repeat index (1-based) of the current dialog. This is different than HDAPI.GetAnswerRepeatIndex, which is 0-based and returns a complete set of four indexes. As such, GetAnswerIterator is most useful for non-nested repeats where there is only one index that matters.
Public method Code example HDAnsGetRptNdx
This function returns the full set of repeat indexes for the current dialog. When using HDAPI.GetAnswer and HDAPI.SetAnswer with repeated dialogs, this function allows you to get or set the values of variables in the current repetition.
Public method HDAnsGetVal
This function gets the answer value for a variable. It can also get a single (indexed) value from a repeated answer.
Public method HDAnsSetVal
This function sets the answer value for a variable. It can also set a single (indexed) value in a repeated answer.
Public method HDEncodeString
Base64-encodes a string of text. Supports internal encoding in UTF-8 or UTF-16.
Public method HDGetAnswerSummary
Returns a summary of answers from the interview in HTML format.
Public method Code example HDGetInterviewBookmark
This function returns a string (up to 70 characters in length) that represents the user's current location in the interview, including the input field that contains the focus. For example, you can call this function from your handler for the PreHDSubmit event, in order to submit a bookmark for the user's current location to the server along with the user's answers. Later, you would use the HDAPI.GotoInterviewBookmark function to return the user to that same location in the interview.
Public method HDGetXMLAnswers
This function returns an XML string of answers from the current interview. For example, you could use this string to overlay the current interview's answers on top of an existing answer file, thus updating the answer file with any answers that have been entered during the interview.
Public method Code example HDGotoInterviewBookmark
This function navigates the user to a specific dialog in the interview, and moves the focus to a designated field within that dialog. If the bookmark is invalid, or the location is no longer part of the interview, no navigation takes place.
Public method HDInvokeButton
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.
Public method HDPostAnswersToServer
This function posts the current answer collection from the interview to the server. The browser interview calls this function internally when the user clicks the Save Answers button during the interview. It may also be invoked from 3rd party code, if (during the course of an interview) you need to post the current answer set to some URL and (optionally) display a server-returned response to the user.
Public method HDPostToServer
This method posts information to the server. It is used by the HDAPI.PostAnswersToServer method for posting answers to the server, but you could use it to post any other kind of information. For example, if your host application can generate some sort of custom summary page, this function could post data to that page and display the response to the user (in the context of the intervew).
Public method HDRegisterHandler
This function is used to register event handlers for various interview events. They can be used for both JavaScript and Silverlight interviews. If necessary the event handler can later be unregistered using the HDAPI.UnregisterHandler function.
Public method Code example HDScreenRefresh
This function refreshes the screen to update answers in the variable fields that have changed.
Public method HDServerResponseVisible
This function returns a value indicating whether or not the modal server response is currently visible or not. If the server response is visible, all the input fields of the interview are currently obscured and unavailable for interaction, and other API functions (such as InvokeButton) will not function.
Public method Code example HDSetButtonVisibility
This function lets callers hide individual buttons on the toolbar or navigation bar. It can also be used to hide the entire toolbar or navigation bar.
Public method HDSetNavButtonImage
This function sets the image to use for navigation bar buttons.
Public method HDSetTemplateTitle
This function sets the template title that appears in the toolbar.
Public method HDSetToolbarButtonImage
This function lets callers specify alternate images for built-in toolbar buttons. It should be called before the toolbar is rendered for the first time, such as in the HDInterviewOptions.OnInit method.
Public method HDSubmitAns
[Deprecated] This function calls the "Finish" action on the interview, which submits answers to the server.
Public method HDUnregisterHandler
This function is used to unregister an event handler for an interview event that was previously registered using the HDAPI.RegisterHandler function.
Top
See Also

Reference