Hi
onChange event fires always,creating problem, suppose i have 5 options setted in a combo ,onChange event calling five times.How to restrict.
Hi
onChange event fires always,creating problem, suppose i have 5 options setted in a combo ,onChange event calling five times.How to restrict.
Please provide some more details. onchange handler will be called when value in the combo ( or select ) changed, similar to native html onchange event handler. If it works differently in your case - please share a sample or a demo link.
Hi
i am using below code snipet
onChange its not clearing node value,if i want to clear (existing values not showed up)
var dxhtmlsc = scheduler.formSection(“hospital”).node;
dxhtmlsc.combo.attachEvent(“onChange”,function(event){
var hid = dxhtmlsc.combo.getActualValue();
node.combo.loadXML(“AjaxAutocomplete1.php?ac=idoctor&hid=”+hid+"&start_date="+st_dt_format+"&end_date="+en_dt_format, function(evn){
//
node.combo.selectOption(node.combo.getActualValue());
node.combo.setComboValue(node.combo.getActualValue()||"");
});
}) ;
node.combo.clearAll();
node.combo.enableFilteringMode(true);
node.combo.loadXML("AjaxAutocomplete.php?ac="+node.getAttribute("name")+"&start_date="+st_dt_format+"&end_date="+en_dt_format, function(){
node.combo.selectOption(ev.doctor_id);
node.combo.setComboValue(ev.doctor_id||"");
});
Hello,
if you want to clear text in combo input, you can call setComboText("") method:
node.combo.clearAll();
node.combo.setComboText("");
Also there is an issue with selectOption usage. The method takes option index as a parameter. So, if you want to select an option, you should either use selectOption with option index as a parameter, or use setComboValue method that will select an option by its value:
node.combo.setComboValue(ev.doctor_id||"");
Hi
because of this
dxhtmlsc.combo.attachEvent(“onChange”,function(event)
its calling so many times onchange event,how to solve.
e.g per lightbox open 8 to 10 times
Hi,
when you call the “node.combo.setComboValue()” method, the “onChange” event is called again, because the value was changed.