user2182307
user2182307

Reputation: 13

what is the similarity and difference between editable and readonly in javascript or extended java script?

Please define the similarity or difference between 'readonly' and 'editable' of java script/extended java script. Eg: if I declare readOnly: true and editable: false or vice versa, for any combo box,in ext-js, then how that combo will work.

Upvotes: 1

Views: 762

Answers (1)

Mchl
Mchl

Reputation: 62387

Exactly as described in API documentation:

http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-cfg-editable

editable: False to prevent the user from typing text directly into the field; the field can only have its value set via selecting a value from the picker. In this state, the picker can also be opened by clicking directly on the input field itself.

http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-cfg-readOnly

readOnly: true to prevent the user from changing the field, and hides the trigger. Supercedes the editable and hideTrigger options if the value is true.

Upvotes: 1

Related Questions