Hi,
I am creating the combo box in each of the table cell dynamically using javascript.
and not able to create the attach event for each of the dhtmlx combo.
Here is the code sample.
Kindly help in the issue.
function CreateComb()
{
var DhtmlxComb = new Array();
for(i=0; i<5; i++)
{
var cell = document.createElement(“td”);
var row = document.createElement(“tr”);
var comb = document.createElement(“select”);
var option = document.createElement(“option”);
comb.id="combid"+i;
option.text = "One";
option.value = "1";
comb.appendChild(option);
option.text = "Two";
option.value = "2";
comb.appendChild(option);
cell.appendChild(comb);
row.appendChild(cell);
document.getElementById("some_table").appendChild(row);
DhtmlxComb[i] = dhtmlXComboFromSelect("combid"+i);
DhtmlxComb[i].attachEvent("onChange", function() {alert(DhtmlxComb[i].getSelectedValue());});
}
}