Does anybody know why a dhtmlxcombo won’t filter by some special characters such as ^ and $? Most other characters do work for me, except for a select few. Why is that?
My filterSelf function looks like this:
[code]dhtmlXCombo.prototype.filterSelf = function(mode)
{
var text=this.getComboText();
if (this._xml){
this._lkmode=mode;
this._fetchOptions(0,text);
}
var filter=new RegExp("^"+text.replace(/([\[\]\{\}\(\)\+\*\\\?\.])/g,"\\$1"),"i");
this.filterAny=false;
for(var i=0; i<this.optionsArr.length; i++){
var z=filter.test(this.optionsArr[i].content?this.optionsArr[i].data()[1]:this.optionsArr[i].text);
this.filterAny|=z;
this.optionsArr[i].hide(!z);
}
if (!this.filterAny) {
this.closeAll();
this._activeMode=true;
}
else {
if (this.DOMlist.style.display!="block")
this.openSelect();
if (_isIE) this._IEFix(true);
}
if (!mode && this._filterAndSelect)
this._correctSelection();
else this.unSelectOption();
}[/code]