0
我有一個ExtJs窗口,當我點擊一個按鈕時,嘗試在瀏覽器的控制檯中打印某些文本字段的值,它在Firefox中正常工作,但在Chrome中不起作用... I真的很困惑。Extjs getCmp在Chrome中丟失了參考文獻
我試圖讓cmb_start_time
和值cmb_end_time
,在Firefox的作品,但無法在Chrome
Ext.define('form', {
extend: 'Ext.window.Window',
requires: [
'Ext.form.Panel'
],
id:'ticket-form',
height: 608,
width: 502,
closeAction: 'close',
title: 'Edit Ticket',
initComponent: function() {
var me = this;
archivopdf = "/pdf/pdf_init.pdf";
Ext.applyIf(me, {
items: [
{
xtype: 'form',
height: 608,
width: 498,
layout: 'absolute',
bodyPadding: 10,
title: '',
items: [
{
xtype: 'combobox',
id: 'cmb_start_time',
x: 20,
y: 180,
width: 180,
fieldLabel: 'Hora Inicio',
store: store_horas,
valueField: 'hora24',
displayField:'hora12'
},
{
xtype: 'combobox',
id: 'cmb_end_time',
x: 20,
y: 210,
width: 180,
fieldLabel: 'Hora Fin',
store: store_horas,
valueField: 'hora24',
displayField:'hora12'
},
{
xtype: 'button',
x: 310,
y: 530,
text: 'Limpiar',
listeners: {
click: function(){
console.log(Ext.getCmp('cmb_start_time').getValue()) //returns NULL
console.log(Ext.getCmp('cmb_end_time').getValue()) //returns NULL
}
}
]
}
]
});
me.callParent(arguments);
}
});
var new_window = Ext.create('form')
我realley需要,使這項工作在Chrome
謝謝!現在它適用於Chrome和Firefox –