Direct JavaScript API
The "Direct" JavaScript API facilitates the traditional means of placing a HotDocs browser interview directly in a host web page (having used one of the GetInterview family of calls). It communicates directly (and synchronously) with the interview runtime, which must be loaded and initialized in the same frame as the host page. The API can therefore only be called from that same frame, or from another page or frame using the same domain name that was loaded by the interview frame.

Formerly, the JavaScript API consisted of global functions, variables and call-backs. These have been deprecated, but are still available as documented below in the (global) section. It is now recommended that integrators use the HDInterviewOptions and HDAPI objects for (respectively) initializing and communicating with HotDocs browser interviews.

Objects

  ClassDescription
Public classHDAPI
HDAPI encapsulates methods for interacting (at runtime) with HotDocs browser interviews running in a frame or window to which you have direct access to the scripting environment. This API can be used for anything from getting or setting answers entered by the user, to customizing the commands available to the user, to detecting and acting on certain user actions.
Public classCode exampleHDInterviewOptions
This object, if you define it in the global scope in JavaScript, will be used by HotDocs during interview initialization. Any properties you leave off your HDInterviewOptions object will inherit the default behavior. Likewise, if you do not declare an HDInterviewOptions object at all, all properties will inherit the default behavior as dictated by the server.
Public class(global)
The legacy HotDocs Server JavaScript API, constituted of global functions and variables, has been deprecated in HotDocs Server 11 and HotDocs Cloud Services. The functions and variables are still present and functional for purposes of backwards compatibility, but new or updated integrations should use the HDAPI and HDInterviewOptions objects instead.