All the form elements like inputs, selects and textareas have some additional features in RightJS to help you work with them.
Unlike other DOM elements, form elements handle a bunch of additional events:
They are handled simultaneously with all the other events. All shortcuts are in place, you can wire and run the events the usual way.
include, blur, disable, enable, focus, getValue, select, setValue
include(Object methods[, boolean dont_rewrite])
Registers additional methods for the form input element units, like INPUT, SELECT, TEXTAREA.
Form.Element.include({
myMethod: function() {....}
});
$('my_input').myMethod();
blur() -> Element self
Looses the focus on the element.
$(
'input').blur();
disable() -> Element self
Disables the element.
$(
'element').disable();
focus() -> Element self
Puts the focus on the element.
$(
'input').focus();
getValue() -> mixed value
Unified access to get a form element value.
$(
'input').getValue();
$('select').getValue();
$('textarea').getValue();
$('multi-select').getValue();