I Am using Extjs 4 , I want Type the Value automatically in my Login Page ?
My code is below I am setting the text for UserName and Password
When I try to retrieve in Login Page in GUI the UserName Value is Not Filled With Mark
Instead Both Mark and Jessey is filling and AutoTyped in Password
How To Actually set the Code in the respective Field
Login.js
Ext.onReady(function(){
Ext.QuickTips.init();
items: [
{
xtype: 'textfield',
fieldLabel: 'UserName',
name: 'j_username',
id: 'lf.txt.username', //Trying to pass Value for this id in GUI as Mark
},
{
xtype: 'textfield',
inputType: 'password',
fieldLabel: 'Password',
name: 'j_password',
id: 'lf.txt.password',//Trying to pass Value for this id in GUI as Jessey When i Launch Code
}
]
}
}
When I try to use the above value in my Login.Html page
Like Below INdex.js
{
var userName = Ext.getCmp('lf.txt.username');
alert(userName);
// alert(lf.txt.password); // It is Gettin UserName as MArk
t.diag(userName.title);
t.type(userName, 'Mark');
var password = Ext.getCmp('lf.txt.password');
alert(password); // It is Gettin password as Jessey Correctly
t.diag(password.title);
t.type(password, 'Jessey');
}
But I am Able to print Both UserName and Password in Password Field only!
I am Able to print the Both Mark And Jessey in Password Field But Not the UserName?
Can anyone Tell me How to Set The Value for UserName In The .js PAge?
Let Me know how to pass the Username and password value to respective field?