Methods
-
init(p_window, p_init)
-
Initializes the HTML sections of the app that are stated in
p_init.Parameters:
Name Type Description p_windowObject The browser window that contains the HTML document to be initialized. p_initJSONinit The initialization info for the form and the welcome section.
Type Definitions
-
JSONinit
-
The initialization info for the form and the welcome section of the web app.
Type:
- Object
- Source:
Properties:
Name Type Description HTMLElementsObject The HTML elements that are to be manipulated by means of JavaScript. Properties
Name Type Description divString The id of the div element where the app is to be run. langString The language of the div element ("de", "en" etc.). sectionFormString The id of the form section. It is displayed to ask the user about her/his name. headingFormString The id of the heading element of the section form. inputNameLabelString The label element associated with the input field of the sectionForm. It should contain a question about the name of the user. inputNameString The id of a ext field where the user shall input her/his name. buttonResetString The id of the reset button. buttonSubmitString The id of of the submit button. sectionHelloString The if of the hello section. It is displayed, when the user has passed her/his name. helloString The id of the HTML element that shall be used to display the hello message. welcomeString The id of another HTML element that shall be used to welcome the user in the course "Multimedia Programming". textObject 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 titleString The title of the form section. questionString The question about the name of the user. resetString The label text of the reset button. submitString The label text of the submit button. helloString 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. welcomeString A second message which welcomes the user in the course "Multimedia Programming". cssObject 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 hiddenString The id of a CSS class that should be used to hide either the hello section or the form section.