Access fields from ClientBefore, ClientAfter events
Variables available in the field events
ctrl
the current field, a Control object.
pageObj
Example:
Set the value of the current field to 100.
ctrl.setValue(100);
ctrl.getPeer( field )
Returns another field control from the same page of the same row in an inline mode:
var ctlPrice = ctrl.getPeer('price');
ctlPrice.setValue( 1000 );
Runner.getControl( pageid, fieldName )
Returns the field control. Works in any events where the pageObj variable is available.
var ctlPrice = Runner.getControl( pageid, 'price');
ctlPrice.setValue( 1000 );
Access fields from the Server events
result
an array of values to return from the server.
getCurrentRecord()
returns an associative array with field values (field name => value).
DoAssignment data, ajax.getCurrentRecord()
result("record") = data
result("email") = data("email")
See also:
•JavaScript API: Date Control API > setValue()
•JavaScript API: RunnerPage object
•JavaScript API: Control object