Global

Methods


init(p_window, p_init)

Initializes the HTML sections of the app that are stated in p_init.
Parameters:
Name Type Description
p_window Object The browser window that contains the HTML document to be initialized.
p_init JSONinit The initialization info for the form and the welcome section.
Source:

Type Definitions


JSONinit

The initialization info for the form and the welcome section of the web app.
Type:
  • Object
Properties:
Name Type Description
HTMLElements Object The HTML elements that are to be manipulated by means of JavaScript.
Properties
Name Type Description
div String The id of the div element where the app is to be run.
lang String The language of the div element ("de", "en" etc.).
sectionForm String The id of the form section. It is displayed to ask the user about her/his name.
headingForm String The id of the heading element of the section form.
inputNameLabel String The label element associated with the input field of the sectionForm. It should contain a question about the name of the user.
inputName String The id of a ext field where the user shall input her/his name.
buttonReset String The id of the reset button.
buttonSubmit String The id of of the submit button.
sectionHello String The if of the hello section. It is displayed, when the user has passed her/his name.
hello String The id of the HTML element that shall be used to display the hello message.
welcome String The id of another HTML element that shall be used to welcome the user in the course "Multimedia Programming".
text Object The words that are to be inserted into the HTML document. The language of those texts is given by HTMLElements.lang.
Properties
Name Type Description
title String The title of the form section.
question String The question about the name of the user.
reset String The label text of the reset button.
submit String The label text of the submit button.
hello String The hello message to welcome the user by name. The message should contain the substring "$1" (without double quotes). The substring is replaced by the name of the user.
welcome String A second message which welcomes the user in the course "Multimedia Programming".
css Object This object maps strings to CSS class names. Usually it is an identity mapping. However, to satisfy the the demand "Put constants in config files" conscientiously, even those mappings are stored in the corresponding JSON file. :-)
Properties
Name Type Description
hidden String The id of a CSS class that should be used to hide either the hello section or the form section.
Source: