0
我使用的是ext js。我在组合框中选择一个值,并使用此值作为参数来获取其他值(两个值)。现在我想将它添加到变量中,以便在除组合框之外的其他位置使用它。我怎样才能做到这一点?如何提取Ext.data.Model数组中包含的值?
var txtEP = new Ext.form.ComboBox({
renderTo: "txtEP",
fieldLabel: 'End Point',
triggerAction: "all",
forceSelection: true,
mode:'local',
autoScroll: true,
allowBlank: false,
autoShow: true,
typeAhead:true,
store: genres,
valueField:'pincode',
displayField:'pincode',
emptyText:'Select a Start Point',
selectOnFocus:true,
listeners : {
'select' : function(){
var selVal = this.getValue();
store.load({
url:'./genres1.php',
params: {pincode: selVal},
callback: function(records) {
endpt = records; // here is where it is assigned
}
});
}
}
});
现在我的“endpt”现在包含Ext.data.Model的数组对象,因此它是提取您需要从他们值的方法。请帮我
它看起来像你这样它了。这段代码有什么问题? – Krzysztof 2012-02-21 13:28:41