Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by aalekhya on Feb 27, 2009 05:42
open dhtmlx forum
issue with finditem in tree

Hi
Iam using dhtmlTree in my code.
I used find functionality in our tree.
For normal characters it working fine.
But for special charactes it is not working fine(like <,>,$ ..symblos)
Please provide me solution
It is very urgent.

thanks
aalekhya
Answer posted by Alex (support) on Feb 27, 2009 09:58

Hi, 

Tree supports only text search.

You can try to modify the regular expression which is used to search text ( in the dhtmlxtree.js, line 3986):

searchStr = new RegExp(searchStr.replace(/([\?\*\+\\\[\]\(\)]{1})/gi,"\\$1").replace(/ /gi,".*"),"gi");




Answer posted by aalekhya on Mar 02, 2009 02:57

Hi

i updated the regexp as below

 searchStr =  new RegExp(searchStr.replace(/([\*\^\$\&\?\>\<\+\\\[\]\(\)]{1})/gi,"\\$1").replace(/ /gi,".*"),"gi");

 

But still it is not working for the special characters(<,>)

for remaing it is working fine for the firsrt time.

But for the 2nd time means if there is 2 records in the tree which have same special character 1st time it showed correctly.But second time it is not showing correctly.

please provide me solution

Thanks

aalekhya

 

Answer posted by Alex (support) on Mar 02, 2009 07:07