HDAPIGetInterviewBookmark Method |
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.
JavaScript API: Direct
Assembly: api.js Version: 1.0.0.0 (1.0.0.0)
Syntax
JavaScript
function GetInterviewBookmark();
Return Value
Type: stringThe requested interview bookmark.
Remarks
"Dialog Name|Dialog item index|Repeat Index"
If the current answer set changes between the time the bookmark is created and when it is used, the bookmark may no longer be valid. For example, if you create a bookmark to the 5th repetition of a repeated dialog, but later delete answers so there are only four repetitions, that bookmark will no longer be valid. Calling HDAPI.GotoInterviewBookmark with an invalid bookmark string will not have any effect.
This function was introduced in HotDocs Server 10.
Examples
JavaScript
var HDInterviewOptions = { OnInit: function () { HDAPI.RegisterHandler("PreHDSubmit", function (eventArgs) { if (eventArgs.Context == "InterviewComplete") { var viewState = document.getElementById("__VIEWSTATE"); if (viewState) fieldArray["__VIEWSTATE"] = viewState.value; } eventArgs.FieldArray["InterviewBookmark"] = HDAPI.GetInterviewBookmark(); } ); } };
See Also