title: IE9 Compatibility Mode Error: Unable to get value of the property '0': object is null or undefined
body: <p>I am trying to get the children of a <code>&lt;tr&gt;</code> element in a table. I need to get each of the individual <code>&lt;td&gt;</code> cells. I cannot use jQuery, only JavaScript for infrastructure reasons. My JavaScript looks like this: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var feeTable = document.getElementById("feeTable");
  
  function gatherRowData() {
    console.log("gathering row data");
    var rows = this.parentNode.children; //This is where it fails.
    var state = rows[0].innerText;
    var county = rows[1].innerText;
    var city = rows[2].innerText;
    console.log("state: " + state);
    document.getElementById("state_code").value = state;
    document.getElementById("county_name").value = county;
    document.getElementById("city_name").value = city;
  }
  
  //Loop through Vehicle Fee Changes to find any empty cells in county, city, or start date.
  for (var i = 0; row = feeTable.rows[i]; i++) {
    var county = row.cells[1];
    var city = row.cells[2];
    var startDate = row.cells[6];
  
    if (county.innerText == "") {
      county.style.backgroundColor = "#FF0000";
      showError(invalidCells);
    }
    if (city.innerText == "") {
      city.style.backgroundColor = "#FF0000";
      showError(invalidCells);
    }
    if (startDate.innerText == "") {
      startDate.style.backgroundColor = "#FF0000";
      showError(invalidCells);
    }
  
    if (document.addEventListener) {
      row.cells[8].addEventListener("click", gatherRowData);
    } else if (document.attachEvent) { //Support for IE
      row.cells[8].attachEvent("onclick", gatherRowData);
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The onClick listeners work just fine, but when I try to get the children of the table row, it gives me the error: <code>Error message: Unable to get value of the property '0': object is null or undefined</code> It works fine in all other browsers, and IE9 without compatibility mode on (it is required to function with compatibility mode). What am I missing that would allow me to get the children of the <code>tr</code> element?</p>