2019.2

Table Of Contents
2. Change the name of the script, so that it reflects what the script does.
Note
Scripts can only have the same name when they are not in the same folder.
3.
Choose the option Selector and in the Selector field, type head.
4. Write a script that appends an element to the <head> of the web page.
Example
The following script adds a <base> element to the head of a web page.
results.append("<base href='https://www.w3schools.com/images/'
target='_blank'>");
Forms
Web templates can contain Forms. Capture OnTheGo templates always contain a Form.
Tip
To create a Capture OnTheGo template, preferably use a Template Wizard (see "Capture
OnTheGo template wizards" on page579). The Wizard doesn't just add the form, it also
adds the necessary Capture OnTheGo form elements (see "COTG Elements" on
page705), style sheets and JavaScript files, and extra pre-made elements.
Adding a Form
This procedure describes how to add a Form element to an existing Web context.
1.
On the Resources pane, expand the Web context and double-click a Web page to open
it.
2.
To use the Form Wizard, select the Insert > Form Wizard menu option. The Form Wizard
adds a Form to the Web page including the specified fields.
Alternatively, you can select Insert > Form on the menu to open a dialog that lets you set
Page 553