childcombo in form

I have a combo working on a form using the following code -

{type:“combo”, name:“manufacturer”, label: “Manufacturer”, connector:“combocode.php?cat=manufacturer” },

I want a second combo on the form for the model of the item but I can not work out the proper syntax for adding or refreshing the second combo -

{type:"", name:“model”, label: “Model”, connector:“combocode.php?cat=” },

I tried adding the second combo and then using onChange event to relaod the XML for the child combo but nothing changes -
var dhxParent = appForm.getCombo(“manufacturer”);
strParent = dhxParent.getSelectedText();
var dhxChild = appForm.getCombo(“model”);
dhxChild.loadXML(“combocode.php?cat=” + strParent);

where am I going wrong?

Paul

:smiley: :smiley:
I worked it out by finding some examples on this forum.

Just in case anyone else has the same problem I added this code to the form onChange event -

if (id == “manufacturer”) {
var comboMa = appForm.getCombo(“manufacturer”);
var comboMo = appForm.getCombo(“model”);
comboMo.clearAll(true);
comboMo.loadXML(“combocodeparent.php?parent=” + comboMa.getComboText());
}