|
Control object allows you to
work with the "edit" controls. Control object is available in the
Javascript OnLoad event of the
appropriate page.
Before you start working
with the "edit" controls, you need to get that controls. Use
.getControl() method to
get controls by the field name and page id:
|
var ctrl = Runner.getControl(pageid,
fieldname);
|
Example:
|
var ctrl = Runner.getControl(pageid,
'Make');
|
To get all the controls of
the table, you need to pass only the table name as the
argument:
|
var ctrlArr =
Runner.controls.ControlManager.getAt(tableName);
|
Example:
|
// Get all the controls for the table
'Cars'
var
recCtrlsArr =
Runner.controls.ControlManager.getAt('Cars');
// loop through
all controls on the page making them all required
for(var i=0;i<recCtrlsArr.length;i++)
{
var
ctrl =
recCtrlsArr[i];
ctrl.addValidation("IsRequired");
}
|
Methods
|
Event name
|
Description
|
|
blur
|
An element
loses focus.
|
|
change
|
The user
changes the content of a field.
|
|
click
|
Mouse clicks
an object.
|
|
dblclick
|
Mouse
double-clicks an object.
|
|
focus
|
An element
gets focus.
|
|
keydown
|
A keyboard key
is pressed.
|
|
keypress
|
A keyboard key
is pressed or held down.
|
|
keyup
|
A keyboard key
is released.
|
|
mousedown
|
A mouse button
is pressed.
|
|
mousemove
|
The mouse is
moved.
|
|
mouseout
|
The mouse is
moved off an element.
|
|
mouseover
|
The mouse is
moved over an element.
|
|
mouseup
|
A mouse button
is released.
|
|
resize
|
A window or
frame is resized.
|
|
select
|
Text is
selected.
|
Examples
Ask for
confirmation before saving a record
Change font in dropdown list
Change font in "edit"
controls
Change width of edit
box with AJAX popup
Change width
of text field on Quick Search panel
How to access PHP variables
How to calculate values
(totals) on the fly
How
to control Inline Add/Edit functionality from script
How to hide
'Edit selected'/'Delete selected' buttons
How to work with foldable
section
How to work with tabs
Show dropdown list of US
states if US was selected in country list
|