Dynamically update inputType from 'password' to 'text'
Dynamically update inputType from 'password' to 'text'
Hello everybody, this is my first post.
I've made a form with a textfield with inputtype="password" and I would like to change inputtype to "text" in order to display the "password" in clear instead of "********".
I'm using a simple textfield defined like this :
{items:[{xtype:"textfield",name:"pass",id:"pass",inputType: 'password'}]}, {items:[{xtype:"button", text:"***", handler: function(){ Ext.getCmp("pass").inputType='text'; }}]}
The property inputType is successfully changed by the handler but the display still the same : "*********"
I've tried to Hide/Unhide the textfield but nothing changed...
I've tried some other "things" but nothing really clean.
PS : I'm french so escuse me for any fault i've made in my post.
first, sorry for the delay of my reply and thanks for your hints.
I've tested different kind of code/method and the only way i've found (to satisfy compatibility condition) is to have two fields :
- one with type="password" that is showed by default
- a second with type="text" that is hidden by default
on a button click i copy values then hide the first field and show the second one...
This is dirty (in my own opinion) but this is working with ie, ff and opera.
now the code i've made (note that i'm using as much as i can extjs functions)
main javascript (just an extract because it's veryyyyy long)