Hi Everyone,
Hope you all are doing good.
I needed little help, I have done one Ajax call in my form, which returns a string. I want to bind this string as a Text of my label.
Code of Ajax call:
myrequest: Ext.Ajax.request({
url: 'outage/ShowBanner',
method: 'POST',
callback: function (success) {
if (success) {
var a = success.callback.arguments[2].responseText;
}
}
}),
Code of Label:
{
xtype: 'label',
bodyStyle: 'background-color: transparent;',
cls: 'x-form-item scroll-left',
text: "",
name: 'lblOutage',
id: 'CDBAdmin.lblOutage'
},
I tried calling a Label in Ajax callback function using its Id but it didn't work, Used following lines:
var Label = Ext.getCmp('CDBAdmin.lblOutage');
Label.setText(a);
Thanks in advance.
Regards,
Rohan