Combobox filter problem

Dear Sir,



I am using dhtmlCombo in my project, its a dynamic one, I have also used the filter there, but whenever I select the option the all option is disappear from the drop down, I would like to have all the option in drop down list after it got filtered.

Please refer the below code I have used in






Hello,


Something similar to the next can be used:


var part_combo=new dhtmlXCombo(“part_zone”,“part”,375);
part_combo.enableFilteringMode(true);
part_combo.loadXML(“XML/allParts.jsp”)
part_combo.attachEvent(“onChange”,onChangeFunc);



part_combo.attachEvent(“onOpen”,function(){
window.setTimeout(function(){
var text = part_combo.getComboText();
part_combo.setComboText("");
part_combo.filterSelf();
part_combo.setComboText(text);
},1)
return true;
});



Hi,

I have applied the suggested code and it is working fine, however when I type some characters matching the content in the list and then type some other characters that is not as per the list and then remove the wrongly typed characters using backspace immediately my whole page is traversed back to the previous page in the browser.
I assume there is some focus problem here. I noticed that when the focus is on the list and backspace is clicked , the key is applied on the browser.
Please advise some solution to this.

Thanks

Are you using any active content on the page, which can introduce problems with focus?
Combo always set focus to their text input, so backspace key must not cause any unwanted effect, but if because of some custom logic or external components focus was moved - such effect can occur.

I am not using any active content. I have tested commenting the below suggested code and the control does not give any problem with Backspace. Only with the below given code added the backspace problem reappears.

I just noticed that this backspace problem occurs only in ie. I have tried in Safari, Google Chrome and Firefox and found that this problem is not there.

IE version is 7.0.5730.13

Unfortunately issue can’t be reconstructed locally.
The only way to have something similar - select item from the list by mouse click - after which focus goes out from combo and as result next backspace key pressing will be processed by browser instead of combo.

If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

Hi,

I have created a sample project. I am sending it in the attachment.
The combo contains some symptoms. Please type lid first and then type s and then click backspace key twice, the page goes back to the previous page in the browser.
Please not that this problem occurs only in IE.
Thanks
Test_Proj.zip (19.2 KB)

Hi,

we have reproduced the problem. It is caused by teh approach that I’ve provided you in the previous reply. But we can not find the the reason for this problem.

Possibly it would be better not to use this onOpen event handler at all…