GetHTMLText function

Syntax

GetHTMLText(HTML.textname [, paramlist])

Where paramlist is an arbitrary-length list of values of undetermined (Any) data type in the form:

inval1 [, inval2] ...

Description

Use the GetHTMLText function to retrieve a predefined HTML text from an HTML definition in the user's current language, or the base language if no entry exists in the user's current language. If any values are included in paramlist, they are substituted into the HTML text based on positional reference (for example, %BIND(:1) is the first parameter, %BIND(:2) is the second, and so on.)

Note:

Use the GetHTMLText function only to retrieve HTML, or HTML that contains a JavaScript program, from an HTML definition. If you have an HTML definition that contains only JavaScript, use the GetJavaScriptURL response class method to access it.

See PeopleCode API Reference: GetJavaScriptURL method: Response class.

You can use this function with PeopleSoft Pure Internet Architecture and Application Engine programs. However, if run from a two-tier environment, the parameter substitution does not take place. When you use this function in Application Engine programs, the meta-HTML in the HTML object referenced by the GetHTMLText function may not resolve due to lack of context, for example, in a two-tier environment, %AppServer is not resolved.

Parameters

Parameter Description

HTML. textname

Specify the name of an existing HTML text from an HTML definition.

Returns

The resulting HTML text is returned as a string.

Example

The following is the text in the HTML definition TEST_HTML:

This is a %BIND(:1) and %BIND(:2) test.

The following is the PeopleCode program:

Local Field &HTMLfield; 
&string = GetHTMLText(HTML.TEST_HTML, "good", "simple"); 
&HTMLfield = GetRecord(Record.CHART_DATA).HTMLAREA; 
&HTMLfield.Value = &string;

The output from &string (displayed in an HTML area control) is:

This is a good and simple test.