Reads the control value.
Syntax
var value = ctrl.getValue();
Arguments
No arguments.
Return value
Returns the current value of the control.
Example1
Read the control value using the JavaScript OnLoad event:
var ctrl = Runner.getControl(pageid, 'Make');
var value = ctrl.getValue();
Example2
Show an alert if the checkbox control is checked using the JavaScript OnLoad event:
var ctrl = Runner.getControl(pageid, 'Discounted');
if (ctrl.getValue()=='on')
alert('Checked');
// you can use the setValue function to clear the checkbox:
ctrl.setValue('');
See also:
•JavaScript API: Control object > getControl()
•JavaScript API: Control object > setValue()
•JavaScript API: Control object > reset()
•Example: Show dropdown list of US states if US was selected in country list
•JavaScript API: Control object