My need is to create a table dynamically and append it with corresponding values from the response XML. My problem is my code is working properly in FireFox browser, where in IE it shows an error – “document.getElementById(…).rows.1.cells’ is null or not an object”.
My function code
var tableEle = document.createElement(‘TABLE’);
var trow = document.createElement(‘TR’);
tableEle.appendChild(trow);
var tcel = document.createElement(‘TD’);
var input = document.createElement(‘input’);
input.setAttribute(“type”, “text”);
tcel.appendChild(input);
trow.appendChild(tcel);
pContainer.appendChild(tableEle);
document.getElementById(tableName).rows[1].cells[1].innerHTML = ~xml value~;