CCS 5.1 jquery select onfocus list data
發表於 : 2013-08-19 15:07:17
1.add script
2.bind event
3.add function
代碼: 選擇全部
<script src="../js/jquery/dependentlistbox/ccs-focus-listbox.js" type="text/javascript"></script>
代碼: 選擇全部
features["get_prod_sub"] = $('*:ccsControl(prodSearch, s_prod_sub_id)');
features["get_prod_unit"] = $('*:ccsControl(prodSearch, s_prod_unit_id)');
代碼: 選擇全部
$('#prodSearchs_prod_sub_id').focus(function() {
params["get_prod_sub"] = {
serviceUrl: "../services/get_prod_sub.php",
masterPath: "prodSearch, s_prod_sub_id"
}
features["get_prod_sub"].ccsBind(function() {
this.ccsFocusListbox(params["get_prod_sub"]);
});
});
$('#prodSearchs_prod_unit_id').focus(function() {
params["get_prod_unit"] = {
serviceUrl: "../services/get_prod_unit.php",
masterPath: "prodSearch, s_prod_unit_id"
}
features["get_prod_unit"].ccsBind(function() {
this.ccsFocusListbox(params["get_prod_unit"]);
});
});