[Solved] ReadOnly cannot receive any value
[Solved] ReadOnly cannot receive any value
BernardoLima
Posts: 20Questions: 0Answers: 0
The following code works properly when I use a "text" type field as a target of the "editor.set" function, but when I change it to a "ReadOnly" field, it does nothing, even the alert box does not shows up.
I have also tried to use !this.get("TEXT_TYPE_FIELD_Z") to get a field value but it's not working, how can I get the input on a text field?
And how can I convert it to integer to multiply it?
[code]
editor.on('onOpen', function () {
$(document).bind('keyup', function (e) {
if ( e.keyCode >= 0 ) {
editor.set("TEXT_TYPE_FIELD_A", "If you can see this, is working");
alert("It worked");
}
} );
} );
[/code]
I have also tried to use !this.get("TEXT_TYPE_FIELD_Z") to get a field value but it's not working, how can I get the input on a text field?
And how can I convert it to integer to multiply it?
[code]
editor.on('onOpen', function () {
$(document).bind('keyup', function (e) {
if ( e.keyCode >= 0 ) {
editor.set("TEXT_TYPE_FIELD_A", "If you can see this, is working");
alert("It worked");
}
} );
} );
[/code]
This discussion has been closed.
Replies
Anyways, here's the solution:
$( 'input', editor.node( 'ch' )).on( 'change', function () {
if ( editor.get( 'ndepessoas' ) > 0 && editor.get( 'ch' ) > 0 ) {
editor.set( 'hht', "My new value" );
}
} );