title: InnerHTML issue in IE8 and below
body: <p>I am editing some code from a previous developer for a timetable filtering system. The way I would tackle this myself is using jQuery so I am having a few issues debugging this problem. There seems to be an issue with the Javascript in IE.</p>
  
  <p>Here is the code where the issue is arising:</p>
  
  <p>The Javascript:</p>
  
  <pre><code>if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
  }
  else
  {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xmlhttp.onreadystatechange=function()
  {
      if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
          document.getElementById("showtimetable").innerHTML=xmlhttp.responseText;
          jQuery('div #moreInfo a').each(function()
  {
      var $link = jQuery(this);
      var $dialog = jQuery('&lt;div&gt;&lt;/div&gt;')
      .load($link.attr('href') + ' #content')
      .dialog
      ({
          autoOpen: false,
          title: $link.attr('title'),
          width: 600
      });
  
  $link.click(function()
  {
      $dialog.dialog('open');
      return false;
  });
  </code></pre>
  
  <p>And the markup:</p>
  
  <pre><code>&lt;div id="showtimetable"&gt;
  &lt;table class="tidytable"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th width="20%"&gt;
                  Venue
              &lt;/th&gt;
              &lt;th width="18%"&gt;
                  Session
              &lt;/th&gt;
              &lt;th width="18%"&gt;
                  Age
              &lt;/th&gt;
              &lt;th width="15%"&gt;
                  &lt;?php echo JText::_('COM_TIMETABLE_HEADING_GROUP'); ?&gt;
              &lt;/th&gt;
              &lt;th width="10%"&gt;
                  &lt;?php echo JText::_('COM_TIMETABLE_HEADING_WEEKDAY'); ?&gt;
              &lt;/th&gt;
              &lt;?php /*&lt;th width="13%"&gt;
                  Activity
              &lt;/th&gt;*/ ?&gt;
              &lt;th width="14%"&gt;
                  Time
              &lt;/th&gt;
              &lt;th width="5%"&gt;
                  Info
              &lt;/th&gt;
  
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tfoot&gt;
          &lt;tr&gt;
              &lt;td colspan="13"&gt;
                  &lt;?php //echo $this-&gt;pagination-&gt;getListFooter(); ?&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tfoot&gt;
      &lt;tbody&gt;
          &lt;?php foreach($this-&gt;items as $i =&gt; $item): ?&gt;
              &lt;tr class="row&lt;?php echo $i % 2; ?&gt;"&gt;
                  &lt;td&gt;                       
                      &lt;?php if($item-&gt;centreDescription!=''){echo '&lt;a href="'.$item-&gt;centreDescription.'" &gt;'.$item-&gt;centre.'&lt;/a&gt;';}
                      else {echo $item-&gt;centre;}?&gt;
                  &lt;/td&gt;                    
                  &lt;td&gt;
                      &lt;?php echo $item-&gt;class;?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                       &lt;?php echo $item-&gt;ageRange;?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php echo $item-&gt;gn;?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php TimeTablesHelper::getWeekday($item-&gt;weekday);?&gt;
                  &lt;/td&gt;
                  &lt;?php /*&lt;td&gt;
                      &lt;?php echo $item-&gt;activity; ?&gt;
                  &lt;/td&gt;*/?&gt;
                  &lt;td&gt;
                      &lt;?php echo substr($item-&gt;startTime,0,5); ?&gt; - &lt;?php echo substr($item-&gt;endTime,0,5); ?&gt;
                  &lt;/td&gt;
                &lt;td width="5%"&gt;
                  &lt;?php if($item-&gt;bookingInfo!=''){?&gt;
                  &lt;div id="moreInfo"&gt;
                    &lt;a href="moreinfo.php?id=&lt;?php echo $item-&gt;id;?&gt;" title="More Details..."&gt;+&lt;/a&gt;
                  &lt;/div&gt;      
                  &lt;?php }?&gt;     
                &lt;/td&gt;                       
              &lt;/tr&gt;              
          &lt;?php endforeach; ?&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is what is in the xml response:</p>
  
  <pre><code>&lt;form action="/component/timetable/" method="post" name="adminForm"&gt;
  &lt;table class="tidytable"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th width="20%"&gt;
                  Venue
              &lt;/th&gt;
              &lt;th width="18%"&gt;
                  Session
              &lt;/th&gt;
              &lt;th width="18%"&gt;
                  Age
              &lt;/th&gt;
              &lt;th width="15%"&gt;
                  Group           &lt;/th&gt;
              &lt;th width="10%"&gt;
                  Weekday         &lt;/th&gt;
                          &lt;th width="14%"&gt;
                  Time
              &lt;/th&gt;
              &lt;th width="5%"&gt;
                  Info
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tfoot&gt;
          &lt;tr&gt;
              &lt;td colspan="13"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tfoot&gt;
          &lt;tbody&gt;
              &lt;tr class="row0"&gt;
                      &lt;td&gt;                       
                          Heywood Civic Centre                     &lt;/td&gt;                    
                      &lt;td&gt;
                          50+ Bowls                    &lt;/td&gt;
                      &lt;td&gt;
                           Aged 50 plus                    &lt;/td&gt;
                      &lt;td&gt;
                          50 Plus                    &lt;/td&gt;
                      &lt;td&gt;
                          Thursday                    &lt;/td&gt;
                                          &lt;td&gt;
                          13:00 - 16:00                    &lt;/td&gt;
                      &lt;td width="5%"&gt;
                                          &lt;div id="moreInfo"&gt;
                          &lt;a href="/moreinfo.php?id=303" title="More Details..."&gt;+&lt;/a&gt;
                      &lt;/div&gt;      
  
                      &lt;/td&gt;                       
                  &lt;/tr&gt;              
          &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;input type="hidden" name="task" value="" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This works fine in Firefox and IE9 but in IE8 and below I am recieving a SCRIPT601: unknown runtime error fitness-classes, line 564 character 7 which refers to the line in the javascript with the innerHTML function.</p>
  
  <p>I am unsure as to why this issue may be arising but it is preventing any of the Javascipt from working. </p>
  
  <p>Does anybody have any idea why this would be occurring?</p>
  
  <p>Many thanks in advance!</p>