attachEvent combo

From designer online

[code] var layout_2 = Layers.attachLayout(‘3E’);

var cell_4 = layout_2.cells('a');
cell_4.setText('Dati');
cell_4.setHeight('90');
cell_4.fixSize(0,1);

var str = [
	{ type:"settings" , labelWidth:80, inputWidth:250, position:"absolute"  },
	{ type:"combo" , name:"form_combo_1", label:"Sezione", labelWidth:200, labelAlign:"left", inputWidth:200, labelLeft:5, labelTop:5, inputLeft:5, inputTop:21  },
	{ type:"combo" , name:"form_combo_2", label:"Foglio", labelWidth:100, labelAlign:"left", inputWidth:100, labelLeft:200, labelTop:5, inputLeft:200, inputTop:21  },
	{ type:"combo" , name:"form_combo_3", label:"Particella", labelWidth:125, labelAlign:"left", inputWidth:125, labelLeft:300, labelTop:5, inputLeft:300, inputTop:21  }
];
 form_2 = cell_4.attachForm(str);[/code]

How do I set up an event on the combo 1-2-3
example attachEvent (“OnSelectionChange”, …);

I tried

z=form_2.getCombo("form_combo_1"); z.readonly(1); z.loadXML("accessodbccombo.php"); z.attachEvent("onSelectionChange", seleDay());
loadxml works onSelectionChange no .

in other code I had done so and it worked fine, but with the code produced by designer I have problems . I am now in confusion

var z = new dhtmlXCombo("combo1", "alfa1", 200); var z1 = new dhtmlXCombo("combo2", "alfa2", 100); var z2 = new dhtmlXCombo("combo3", "alfa3", 100); z.readonly(1); z1.readonly(1); z2.readonly(0); z.loadXML("accessodbccombo.php"); z.attachEvent("onSelectionChange", seleDay); z1.attachEvent("onSelectionChange", selePTS); z2.attachEvent("onSelectionChange", countPTS);

thanks

I may have found this solution

form_2.attachEvent('onChange', function(id, value){
		if (id=="form_combo_1"){
			seleDay();
		}
		if (id=="form_combo_2"){
			selePTS();
		}
		if (id=="form_combo_2"){
			alert('');
		}
	}); 

now I have to test it :confused: