mercredi 19 mars 2014

Change text field to password field dynamically in IE8

Hi All,

I need to change text field to password field dynamically in IE8

When the user select a checkbox I need to clear the text field contents and then when the user start entering the values in the text field it has to show only *** and not the real text (which is the behavior of password field) .



I know we can do this by two fields (text field and password field) and then show/hide the fields based on the condition.
But is there is any other way to do this using a single text field by changing some properties of the text field.


This command is working in Firefox and not in IE

var passwordField = Ext.getCmp('password');

passwordField.getEl().dom.setAttribute('type', 'password
');



Also I tried the below but non are working :((

  1. passwordField.inputEl.dom.type = 'password';

  2. passwordField.xtype = 'password';

  3. passwordField.inputType = 'password';




Any idea will be appreciated



Thanks

Joseph




Aucun commentaire:

Enregistrer un commentaire