Insertrow Returns Null In Ie7
var otbody = document.createElement('tbody'); var otr = otbody.insertRow(ordernumber); otr.id='order' + ordernumber; var pidCell = otr.insertCell(0)
Solution 1:
IE7 requires tbody attached to a table element to create tr, so you should create an extra table element, append the tbody element to table, than call insertRow on tbody element:
var otable = document.createElement('table');
var otbody = document.createElement('tbody');
otable.appendChild(otbody);
var otr = otbody.insertRow(0); // now otr will not be null
var otd = otr.insertCell(0); // and the same as tr element
Post a Comment for "Insertrow Returns Null In Ie7"