Combo speed problems in IE6

I am currently evaluating some of your components and encountered a problem in the combo code (v1.3):

In IE6 only, if you create a combo with say 5000 entries, the mouse selection (mouseover) and mouse click events can take several seconds. Waiting 5-10 seconds between each mouse movement and click is obviously unusable.

I narrowed it down to a problem in IE6 that has to do with looping through many childNodes in a dom. So in order to skip the looping code, I wrote a patch that stores the position of the node in the array instead (code included below). Please comment on this patch and let me know if I did anything wrong, and whether you will be using this in the next version…

dhtmlXCombo.prototype.addOption = function(options) {

if (!arguments[0].length || typeof(arguments[0])!=“object”)

args = [arguments];


args = options;


for (var i=0; i<args.length; i++) {

var attr = args[i];

if (attr.length){

attr.pos = (this.optionsArr.length+i);

attr.value = attr[0]||"";

attr.text = attr[1]||"";

attr.css = attr[2]||"";






dhtmlXCombo_defaultOption.prototype.setValue = function(attr) {


this.value = attr.value||"";

this.text = attr.text||"";

this.css = attr.css||"";



dhtmlXCombo_defaultOption.prototype.render = function() {

if (!this.content){



this.content._self = this;‘width:100%; overflow:hidden;’+this.css;

if (_isOpera || _isKHTML )“2px 0px 2px 0px”;




return this.content;


dhtmlXCombo.prototype._selectOption = function(e) {

(e||event).cancelBubble = true;

var node=(_isIE?;

var that=this.combo;

while (!node._self) {

node = node.parentNode;

if (!node)



var i=node._pos;






dhtmlXCombo.prototype._listOver = function(e) {

e = e||event;

e.cancelBubble = true;

var node = (_isIE?;

var that = this.combo;

if ( node.parentNode == that.DOMlist ) {

if(that._selOption) that._selOption.deselect();

            if(that._tempSel) that._tempSel.deselect();

var i=node._pos;

var z=that.optionsArr[node._pos];


            if ((that._autoxml)&&((i+1)==that._lastLength))




The changes in code, which you have introduced, doesn’t cause any negative side effect.

The only issue - they are will work only with static list, in case if you will delete some option from the list - all indexes need to be recalculated, except of that - all other must work correctly.
( because of such limitation I don’t think that we will include similar updates in main codebase )

By the way, for such big datasets, you can use dyn. loading mode, which will provide much more better performance. … ng/100000/

Well in my case I have all the data already in the page and I don’t have any server-side php code so I have no choice but to show it all. Plus they need to be able to scroll through the complete list to find what they need in some cases.

I don’t delete items so that’s not a problem.

Whether you want to use something like this to make it usable in IE6 is up to you of course… I’ll just keep using the patch.

By the way I forgot to mention that it gets slower and slower the further down you go in the list. I.e. try selecting item #5000 and clicking on it.