Object model

An ITP/OnLine web form consists of a hierarchy of groups and questions, presented inside an HTML form on an HTML page. Therefore, an ITP/OnLine web form can be modeled as a tree of objects, each representing a node in the hierarchy mentioned before. The root node of this tree will represent the HTML page as a whole, whereas each sub node will represent one element on the page, i.e. the HTML form, a group, a question or a (submit) button. Questions can be of many types, e.g. a text question, a number question, a date question or a select question. Select questions may allow for a single or for multiple items to be selected and may or may not present text blocks as selectable items.

The JavaScript object model defines a class for each of the node types described above. The corresponding class hierarchy is presented in the picture below. The details of each class are described in Appendix E. The most important features are described in the following paragraphs.

Javascript Object Model Class diagram