Description
Function BeforeShow<PageName>
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<PageName>(xt,templatefile)
Arguments
xt - template engine
object. Use xt.assign("valueName") to assign values displayed on
the page.
templatefile - name of
the template file being displayed.
Applies to
List, View, Add, Edit, Print, Search, Export, Report, Chart,
Login, Register, Password reminder, Change password, Menu
Example
To display current date and time on the List page:
1. Proceed to the Visual
Editor page.
2. Switch to HTML mode and find the line {END
recordcontrols_block}. Add the following code right before it:
<DIV>{$sample_code}</DIV>
|
3. Add the following code to the List page: Before display event.
dim str
str="<b>Today is </b><i>" & FormatDateTime(now(),1) & " " & FormatDateTime(now(),3) & "</i>"
xt.assign "sample_code",str
|
Recommended predefined actions
and sample events
Send a
simple email
Insert a record
into another table
Check to see if a
specific record exists
Display a
message on the Web page
Redirect to another
page
Hide controls on
Add/Edit pages, based on logged user name
|