Using the HTML Area

Two methods are used to populate an HTML area control. Both require accessing the HTML area in the PeopleSoft Application Designer. One method is to select Constant on the HTML tab of the HTML page field properties dialog and enter HTML directly into the page field dialog.

The other method is to select Value on the HTML tab of the HTML page field properties dialog and associate the control with a record field. At runtime, populate that field with the text that you want to appear in the HTML area.

If you are using an HTML area to add form controls to a page, you can use GetParameter request class method in PeopleCode to get the user input from those controls.

Note:

When you associate an HTML area control with a field, make sure the field is long enough to contain the data you want to pass to it. For example, if you associate an HTML area control with a field that is only 10 characters long, only the first 10 characters of your text will appear.

The following code populates an HTML area with a simple bulleted list. This code is in the RowInit event of the record field associated with the HTML control.

Local Field &HTMLField; 
&HTMLField = GetField(); 
&HTMLField.Value = "<ul><li>Item one</li><li>Item two</li></ul>";

The following code is in the FieldChange event of a button. It populates an HTML area (associated with the record field CHART_DATA.HTMLAREA) with a simple list.

Local Field &HTMLField; 
&HTMLField = GetRecord(Record.CHART_DATA).HTMLAREA; 
&HTMLField.Value = "<ul><li>Item one</li><li>Item two</li></ul>";

The following code populates an HTML area (associated with the record DERIVED_HTML and the field HTMLAREA) with the output of the GenerateTree function:

DERIVED_HTML.HTMLAREA = GenerateTree(&TREECTL);

The following tags are unsupported by the HTML area control:

  • Body

  • Frame

  • Frameset

  • Form

  • Head

  • HTML

  • Meta

  • Title