Hello,
Earlier i was using Dhtmlx 2.5 pro edition in my application.After that i upgraded the version to 3.5.
In my application I have object of dhtmlXCombo as follows.
var combo =new dhtmlXCombo(“combo_zone2”,“alfa2”,250);
combo.attachEvent(“onBlur”,onBlurFunc);
function onBlurFunc(){
combo.clearAll();
combo.addOption([
[“a”,“option A”],
]);
combo.selectOption(0, true, true);
return true;
}
selectOption(0,true,true); is working fine in 2.5 version.
But there is some problem is 3.5 version with this code,the problem is cursor focus is always coming to this combo box if value exists in the combo box even if we click any other fields.
To resolve this cursor focus problem I am doing like selectOption(0,null,false); and now it’s fine.Don’t know exactly how it is working, but it’s working (need explanation).
Is there any problem in onBlur event in 3.5 version.?
but i added the following code in 01_combo_events.html
Added one input box
Added the following code in the onBlurFunc() combo.clearAll();
combo.addOption([
[“a”,“option A”],
]);
combo.selectOption(0, true, true);
Test Scenario
If there is no value selected in the combo box i am able to enter values in the text box.But as soon as i select anything in the combo box i am not able to write anything into the text box,because the cursor focus is always going to combo box.
I attached the code.But if u want to do demo u can add point number 1 and 2 in 01_combo_events.html
Now the problem is resolving if instead of selectOption(0, true, true); i put selectOption(0, null, false);,but i don’t know what is the signification of this code.
But my doubt is using setComboValue(“option A”); instead of selectOption(0, true, true); will make any difference or not.What are the parameter significance of selectOption() method.