如何获取所选 fname 的 fId?
这是我的代码..
var fS = new Memory({ //store for the combo
data: [
{fN:"", fId:""}
]
});
var fCombo = new ComboBox({ //combo box
id: "fCombo",
name: "fCombo",
value: "Select",
searchAttr: "fName"
}, "fCombo");
fCombo.store = fStore;
dojo.xhrPost({
url: "XXX",
handleAs: "json",
load: function(response, ioArgs){
fCombo.store.data = response.xx;
return response;
},
error: function(response, ioArgs){
console.log("Error", response+' '+ioArgs);
return response;
}
});
dojo.connect(dijit.byId("fCombo"), 'onChange',function(e){
//code to write based on f id
}
我试过这个..
var Id = fStore.getValue(dijit.byId("fCombo").data, "fName");
但不能..它说对象不支持这个属性
请帮忙..!