Just a simple tip. When embedding static javascript code on a page, the obvious approach is to place the code as a constant value in the HTML Area control. For example, suppose the following code:


var something = "something";
function SomeThing() {
   /* Something */
   /* something... */
}

This may be embedded as an HTML Area constant value: HTML Area constant value

However, most of the time it would be nice to instead store the code in an HTML definition. This not only provides a better editor, but also makes it more maintainable and search-able in Application Designer. HTML Definition (JS_CODE)

To assign the content of the HTML definition to the HTML Area, it is possible to bind the HTML Area to a record field and populate it in PeopleCode using GetHTMLText function. However, a better approach is to use the %JavaScript meta-HTML function on the HTML Area constant value, as follows: Using %JavaScript in HTML constant

In addition to being quicker to implement (no PeopleCode), the %JavaScript reference also allows the code to be cache-able by the browser — for better client-side performance.