0
votes

Iam using two textfields (login and password ) and button in composite field, when click on button disable composite field and display another composite field like bellow

txtPwd1.getEl().up('.x-form-item').setDisplayed(true);txtPwd.getEl().up('.x-form-item').setDisplayed(false);

but this is worked in IE only not working in firefox and chrome......

Please help me

Thanks in advance

1
Is the disable() method of composite field not working?Swar
@Swar I don't think he wants to disable it, I think he wants to hide it completely (I suppose hide() would suffice). @MNR What happens if you step through your code with firebug?JamesHalsall

1 Answers

0
votes

The reason it isn't working is you should be using the setVisible method. I think that the reason that the setDisplayed is working in IE is that it must try and re-render the panel for some reason. setVisible doesn't need to be rendered for it to make the field invisible.