Description
The Before Display event is executed right before a page is displayed in the browser. Use this event to modify the value of any template variable or to define a new one.
Syntax
BeforeShow(xt, pageObject)
Arguments
xt
a template engine object. Use xt.assign "name", "val" to assign a value val to the variable name.
pageObject
an object representing the current page. For more information, see RunnerPage class.
Applies to pages
List, Add, Print, Search, Export, Report, Chart, Login, Register, Password reminder, Change password, Menu.
Example
To display some text on the List page:
1. Proceed to the Editor page.
2. Switch to HTML mode and find the line {END container_recordcontrols}. Add the following code right before it:
<DIV>{$sample_code}</DIV>
3. Add the following code to the BeforeDisplay event.
dim str
str="<b>Today is </b><i>" & FormatDateTime(now(),1) & " " & _
FormatDateTime(now(),3) & "</i>"
xt.assign "sample_code",str
Recommended sample events:
•Hide controls on Add/Edit pages, based on logged user name
See also: