Inhaltsverzeichnis

JavaScript Library SoSciTools

SoSci Survey automatically includes a JavaScript library in the questionnaire . This can be used SoSciTools in JavaScripts within the questionnaire.

SoSciTools

The following static methods are available through SoSciTools:

Questionnaire Elements

Questionnaire Control

Buttons in Questionnaires

General Help Functions

SoSciTools.Questionnaire

The variable SoSciTools.questionnairecontains an object of the class SoSciTools.Questionnaire. The object is also available SoSciTools.questionnaireunder the alias ( ). s2window.s2

The object supports the following methods:

In addition, (most) questions on the questionnaire page are represented by a JavaScript object within s2. This is available under the question identifier . A multiple choice question with the identifier , SE01for example, is available under s2.SE01. It is an object of the class SoSciTools.Question.

SoSciTools.Question

(Most) questions are SoSciTools.Questionrepresented by an object of the class. This object has the following properties:

In addition, the following method is available:

Some question types (eg choice) trigger an event 'response'when respondents interact with the question. The event (CustomEvent) has the following properties:

SoSciTools.Progress

The variable SoSciTools.progress contains an object of the class SoSciTools.Progress and supports the following methods: