Hello,
Am playing around with some javascript examples for W3school:
when i try and convert the html with the following function prince gives me a TyeError: null value is not an object. the line its highlighting is var row = table.inserRow();
Would greatly appreciate any help with this.
Am playing around with some javascript examples for W3school:
function fnCreateTable(){
// Find a <table> element with id="myTable":
var table = document.getElementById("myTable");
// Create an empty <tr> element and add it to the 1st position of the table:
var row = table.insertRow(0);
// Insert new cells (<td> elements) at the 1st and 2nd position of the "new" <tr> element:
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
// Add some text to the new cells:
cell1.innerHTML = "NEW CELL1";
cell2.innerHTML = "NEW CELL2";
}
when i try and convert the html with the following function prince gives me a TyeError: null value is not an object. the line its highlighting is var row = table.inserRow();
Would greatly appreciate any help with this.