Creating HTML Definitions

This chapter provides an overview of HTML definitions and discusses how to:

Click to jump to parent topicUnderstanding HTML Definitions

An HTML definition is a blank window where you can enter HTML. Use HTML definitions for storing long strings of HTML text or HTML text that you use repeatedly in your application. Later, you can access the definition dynamically from an HTML area control by using the GetHTMLText PeopleCode function.

See GetHTMLText.

You can reference HTML definitions from an HTML area control statically or dynamically. However, the most common usage is to reference HTML definitions dynamically.

Click to jump to parent topicCreating HTML Definitions

To create an HTML definition:

  1. Select File, New.

    The New Definition dialog box opens, enabling you to select the definition you want.

  2. Select HTML from the scroll area.

  3. Click OK to open a new HTML definition.

  4. Type or paste the HTML text directly into the open definition window.

  5. Select File, Save to save the HTML definition.

    The system saves the HTML definition in the current database.

Click to jump to parent topicOpening HTML Definitions

To open an HTML definition:

  1. Select File, Open to access the Open Definition dialog box.

  2. Select HTML from the Definition drop-down list box.

  3. Click Open to show all of the HTML definitions that are currently stored in the database.

    You can also enter a letter or word in the Name edit box to filter the display. For example, entering the letter H reveals all of the HTML definitions that begin with H in the database.

    Naming a group of HTML definitions with the same introductory phrase can help keep them together for easy selection.

Click to jump to parent topicReferencing HTML Definitions Dynamically

To reference an HTML definition dynamically:

  1. Add an HTML area control to a page definition.

  2. Open the HTML Area Properties dialog box.

  3. Select the Constant option.

  4. On the HTML tab, enter the GetHTMLText PeopleCode function for the HTML definition that you want to reference.

  5. Click OK.

See Also

Populating HTML Areas

Adding Page Controls

Using HTML Definitions and the GetHTMLText Function