<link rel="STYLESHEET" type="text/css" href="../../../dhtmlxCombo/codebase/dhtmlxcombo.css">
<script src="../../../dhtmlxCombo/codebase/dhtmlxcommon.js"></script>
<script src="../../../dhtmlxCombo/codebase/dhtmlxcombo.js"></script>
<script type="text/javascript" src="../../codebase/datastore.js"></script>
<div id="combo_here1" style="width:600px; height:270px; background-color:white;"></div>
<div id="combo_here2" style="width:600px; height:270px; background-color:white;"></div>
<script>var list1 = new dhtmlXDataStore({
url: "../common/data/data.json",
datatype: "json";
});
list1.data.scheme({
$init: function(obj) {
obj.value = obj.id;
obj.text = obj.Package;
}
});
var list2 = new dhtmlXDataStore({
url: "../common/data/data.json",
datatype: "json";
});
list2.data.scheme({
$init: function(obj) {
obj.value = obj.id;
obj.text = obj.Package;
}
});
list2.bind(list1, function(data, filter) {
return data.value == filter.value;
});
dhtmlx.image_path = "../../../dhtmlxCombo/codebase/imgs/";
combo1 = new dhtmlXCombo("combo_here1", "combo1", "100%");
combo1.attachEvent("onSelectChange", function(id) {
list1.setCursor(id);
});
combo1.sync(list1);
combo2 = new dhtmlXCombo("combo_here2", "combo1", "100%");
combo2.sync(list2);
</script>