U is null in dhtmlx.js

Hi all,
using ver. 5.0, I have a ComboBox on a Form. I enabled filtering mode with “between” parameter…
With the help of FireBug, I see that everytime I type a letter in the combo the php script is executed and it returns the right data…
Intead of seeing the combo open, I get the following error on the console tab of FireBug:[code]TypeError: u is null


dhtmlx.js (line 9, col 17805)[/code]
With this little information, is it possible for someone to tell me what I’m missing?
Thank you in advance for any hints!

Most probably, there is some problem with server side response, it may be not valid XML or XML data in a different format.

If problem still occurs please share a sample or a demo link, where the issue can be checked

Hello Stanislav, thank you for your comment!
Encouraged by your comment and after a lot of debugging, I made it work… :astonished: :sunglasses:
I’m not very happy with what I did because I changed a variable of your code in your dhtmxcombo.js file at lines 213 and 217…var callBack = function(r) { // cache if (that.conf.f_cache) { if (!that.conf.f_cache_data[k]) that.conf.f_cache_data[k] = {data:[],dyn_end:false,mask:k}; that.conf.f_cache_data[k].data.push(r.xmlDoc.response); } // load opts that.clearAll(); that.load(r.xmlDoc.response); I changed the variable from r.xmlDoc.responseXML to r.xmlDoc.response and everything started to work fine…
r.xmlDoc.responseXML was always null and instead r.xmlDoc.response always contained the right data…
My data is formated with and without any CDATA[] or headings… I had also tried with headings and CDATA[] but with no results…
Do you mind investigating this issue and teaching me what’s the correct format so that it gets assigned correctly to r.xmlDoc.responseXML as well?

Thank you very much!

Can you post the exact output of server side, which was not processed correctly.

There are next common rules

  • content/type of response must be text/xml (important for IE)
  • there must be no any whitespaces before the first XML tag (important for non-IE browsers)

Here is a sample:

[code]#nome#false0084030150096MITEST.AMPL.IMP.T.2015 VALF</text

0084003150096MITEST NAV.AGV N

.3 VALFR0009085130096MITEST
This has a template… but it does not work even without…

Thank you very much!

the template is fine and must not cause any problems.
Can you please try to load the data url directly in the browser and post it output (so it will be not a template but a real output )

Also, please double check that content type of response is text/xml ( you can use network tab of dev. tools in a browser to get such an info about the request )

Sorry but I’m not sure I understand what you need…
Anyway, here is the same data without template: <complete><option value="0084030150096MI">TEST.AMPL.IMP.T.2015 VALF</option><option value="0084003150096MI">TEST NAV.AGV N.3 VALFR</option><option value="0009085130096MI">TEST RICAMBI</option></complete>
Pls. let me know if this is what you wanted…

Thank you again for your help!


The data itself looks correct. I’m not sure why it doesn’t work in your case.
Are all the data in the xml is a normal Latin, or does it include some non-latin characters. The second can result in invalid XML parsing ( in which case XML object will be missed, but response text will be available - same as in your case )

Hello Stanislav, thank you for your comment!
I can’t exclude that there mignt be a non-Latin character in 3000+ records… but in the filtered result there aren’t any!
The funny thing is that the procedure is working fine using Suite 3.5. When using 5.0 I found this problem… using the same data!!

For the time being, I’ll use the solution I found and see what happends…


Please, try to declare the using encoding type in your xml:

<?xml version="1.0" encoding="your_encode"?>