getLanguageID(); //Trigger when each time page Refresh...
alert("Welcome to Application");
var flag = Ext.getCmp('txthidden').getValue();
if (flag == 1) {
var login_lbl = "ಲಾಗಿನ್";
//-----this label I used for textFild --> fieldLabel: '<b>' + login_lbl + '</b>',
}
if (flag == 2) {
var login_lbl = "Login";
//-----this label I used for textFild --> fieldLabel: '<b>' + login_lbl + '</b>',
}
var txtLoginName = Ext.create('Ext.form.TextField', {
id: 'txtLoginName ',
name: 'txtLoginName ',
fieldLabel: '<b>' + login_lbl + '</b><b><font color=red>*</font></b>',
anchor: '90%',
readOnly: false,
allowBlank: false
});
....
....
Ext.onReady(function () {
Ext.QuickTips.init();
var win = Ext.create('Ext.Panel', {
layout: 'fit',
renderTo: 'loginform',
width: 550,
height: 170,
closable: false,
resizable: false,
plain: true,
border: false,
items: [login]
});
Ext.getCmp('UserNameId').focus(false, 200);
});
function getLanguageID() {
Ext.Ajax.request({
url: '/General/AdministrationDefaultXMLDOM.aspx?qid=111',
success: function (response) {
var hidden = Ext.JSON.decode(response.responseText);
var Tenor = hidden[0].Language;
// here Tenor value is fetch from database 1 or 2. that is fine.
var txthidden = Ext.create('Ext.form.TextField', {
id: 'txthidden',
name: 'txthidden',
hidden: true,
});
Ext.getCmp('txthidden').setValue(Tenor);
}
});
}
如果我使用警报(&#34;欢迎使用应用程序&#34;); js从&#34; txthidden&#34;中获取标志值后加载。并正确回答..
否则js页面在设置为标志的值之前加载...标签是&#34;未定义&#34;代替&#34;提交了Lable&#34;