Hi there, i am having problem with dynamic dropdown list. my list is generated on the fly while user is typing the letter in the box. But the list displays duplicates of one item. for instance, if we have records “abc” “abb” “abcdefg” in the database.
user types “ab” then the list displays fine. when user’s input gets to “abc”, the matched option is displayed which is “abcdefg”. if user keeps typing “abcd” and then “abcde” and then “abcdef”. the list then will be displaying “abcdefg” several times depending on how many time the database had been queried until it returned no result.
i believe the problem is caused by the xml content has not got cleaned before a new xml list is returned from the database query. tried to modify dhtmlxcombo.js but had no luck.
make sure that server-side script generates desired xml (that doesn’t contain duplicate items). Please check ready combo samples:
the same on our website: dhtmlx.com/docs/products/dht … ilter.html
thanks for your reply but i am pretty sure the returned xml from the server is a clean list of items with no duplications. i have checked that in firebug. it shows the returned xml in its console and the list contains only one record.
i presume the combobox caches the previous data. please have a look at the list i have attached. it displays the one item several times as you can see from the picture. the list will get longer and longer with the same item on the list if you keep typing in the combobox.
please help me with other question i have had: how do you disable autocomplete but keep filtering function. at the moment it automatically completes the textbox when there are several matched options for the entered text. i hope a function that will filter out the unmatched options from the list and provide the matched items as options on the dropdown list rather than force the textbox to accept one which probably is not the user’s desired one.
You may try to use enableFIlteringMode(true,url,false) in order to disable caching.
However, there are no reasons for described problem. If the problem isn’t solved, please provide the sample to recreate the problem.