new FieldStep(input_id, result, end_message, options) → {Object}
Exercises - One already rendered text input field activation
Parameters:
Name | Type | Argument | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
input_id |
String | The input identifier | |||||||
result |
Mixed | The correct result | |||||||
end_message |
String |
<optional> |
A message to be displayed at the end of the step | ||||||
options |
Object | The step options
Properties
|
- Source:
- mathex/res-otto/js/mathex.js, line 1090
Returns:
FieldStep instance
- Type
- Object
Example
// if a previous defined (in a mathex.TextFieldStep object) input field exists, with id=2
var step = new mathex.FieldStep(2, 16, null, {type: 'int'});
Extends
Methods
-
addInputEvents()
Executes the step
-
Activates the input
- Source:
- mathex/res-otto/js/mathex.js, line 1110
Returns:
void -
checkFieldResult(field, result, fieldobj)
Checks the result of a text field
-
Parameters:
Name Type Description field
Object The mootools input field object result
Mixed The right result fieldobj
Object The input object - Inherited From:
- Source:
- mathex/res-otto/js/mathex.js, line 616
-
deactivate()
Deactivates all inputs
-
- Source:
- mathex/res-otto/js/mathex.js, line 1136
Returns:
void -
removeInputEvents()
Removes events from the text input
-
- Source:
- mathex/res-otto/js/mathex.js, line 1126
Returns:
void -
run(router)
Executes the step
-
Activates the text input
Parameters:
Name Type Description router
Object a mathex.Router instance - Source:
- mathex/res-otto/js/mathex.js, line 1096
Returns:
void