How can I use with dynamic content dhtmlXComboFromSelect (Aj

Need to function more or less like this:



<!--------------------------------------------------------------------------------------->



    state1

    state2

    state3







    

        city1

        city2

        city3

    







<!--------------------------------------------------------------------------------------->



How do I do that? is it possible?



ty

Hello,
the provided code looks correct. What issue have you faced ?

The ajax to change the content of "" the dhtmlxcombobox no longer recognizes him

How do dhtmlxcombobox with dynamic content?

You need to call next block of lines

var cities = dhtmlXComboFromSelect(“cities”);
cities.readonly(1);
cities.enableOptionAutoHeight(1);

from ajaxGet callback, so each time, when second area reloaded - second combo will be initialized from new data.

Actually you can replace ajaxGet with native method of combo

function onChangeFuncNewCities() {
cities.loadXML(“cities.php?for=”+state.getComboValue()) ; //load xml data with new list of values for combo
}