Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (52 sloc) 3.92 KB
<!DOCTYPE html>
<meta charset="utf-8">
<title>TheFragebogen: questionnaire featuress</title>
<link rel="stylesheet" type="text/css" href="example.css">
<script src="../thefragebogen.js"></script>
var questionnaireItems = [];
questionnaireItems.push(new UIElementHTML(undefined, "<h1>TheFragebogen</h1>"));
questionnaireItems.push(new UIElementHTML(undefined, "<h2>Available QuestionnaireItems</h2>"));
questionnaireItems.push(new QuestionnaireItemSVGVisualAnalogueScale("max-width", "The <a href=''>Visual analogue scale</a><br>Labels can be configured.", false, "Label left", "Label right"));
questionnaireItems.push(new QuestionnaireItemSVGNASATLX("max-width", "The <a href=''>NASA-TLX scale</a><br>Labels can be configured.", false, "very low", "very high"));
questionnaireItems.push(new QuestionnaireItemSVGQuality7pt("max-width", "Continuous scale for subjective quality assessment (cf. <a href=''>ITU-T P.851</a>)", false));
questionnaireItems.push(new QuestionnaireItemWrite("write-border", "Free hand input<br>Left mouse-button: draw<br>Right mouse-button: draw<br>The drawn image is exported as <a href=''>PNG</a> in <a href=''>Base64</a><br> It supports a background image.", false));
questionnaireItems.push(new QuestionnaireItemDefinedOne(undefined, "A question with pre-defined answers, where <i>one</i> answer has to be selected.", false, ["a", "b"]));
questionnaireItems.push(new QuestionnaireItemDefinedSelector(undefined, "A question with pre-defined answer, where <i>one</i> answer has to be selected.", false, ["a", "b"]));
questionnaireItems.push(new QuestionnaireItemDefinedMulti(undefined, "A question with pre-defined answers, where <i>multiple</i> answers can be selected.", false, ["a", "b"]));
questionnaireItems.push(new QuestionnaireItemText(undefined, "Just a text field.", false));
questionnaireItems.push(new QuestionnaireItemTextArea(undefined, "A multi-line text field. A so-called text area.", false, null, null, "This is the default text."));
questionnaireItems.push(new QuestionnaireItemDate(undefined, "A date selector.", false));
questionnaireItems.push(new QuestionnaireItemDefinedRange(undefined, "Continuous input with a slider.<br>This one ranges from 0 to 100.", false, 0, 100));
questionnaireItems.push(new QuestionnaireItemDate(undefined, "Asking for a date.", false));
questionnaireItems.push(new UIElementHTML(undefined, "<h2>Available UIElements</h2>"));
questionnaireItems.push(new UIElementButton(undefined, "Action", function() {
alert("UIElementButton was pressed.");
function start() {
if (typeof(questionnaireItems) === "undefined") {
document.body.innerHTML += "Demo could not start.";
document.body.innerHTML += "<br><i>Something went wrong:</i> Please check that thefragebogen.js was loaded and that the configuration is ok.";
document.body.innerHTML = "";
var screen = document.createElement("div");
for (var i = 0; i < questionnaireItems.length; i++) {
<body onload="start()">
TheFragebogen will be shown here.<br> If something fails while starting, an error message will be shown here.
You can’t perform that action at this time.