0
如何獲取所選fname的組合框?如何獲得在dojo中選擇的組合框項目的ID
這裏是我的代碼..
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");
,但不能。它說,對象不supprt這個propertty
請幫助。 。!