Mar 10, 2012, 12:14 PM
How to disable a TextField when a CheckBox is changed?
Hello,
I'm new to ext.net and ext.js. I have this checkbox of which id is CheckboxTax2 and this textfield of which id is TextFieldReferer2 . How to achieve when I checked or unchecked the checkbox it will disable/enable the textfield. I've tried this code but it doesn't work
I'm new to ext.net and ext.js. I have this checkbox of which id is CheckboxTax2 and this textfield of which id is TextFieldReferer2 . How to achieve when I checked or unchecked the checkbox it will disable/enable the textfield. I've tried this code but it doesn't work
<ext:Checkbox
ID="CheckboxTax2"
DataIndex="CheckboxTax2"
runat="server"
FieldLabel="Tax">
<Listeners>
<Change Handler="#{TextFieldReferer2}.Text = ''; #{TextFieldReferer2}.Disabled = !#{CheckboxTax2}.Checked" />
</Listeners>
</ext:Checkbox>
Is there something wrong with the code? Any advice is welcome. Thank you.