title: Object doesn't support property or method 'remove'
body: <p>I know there is some issue with get <code>document.getElementById</code> and IE, but not sure why IE is having a problem with <code>.remove</code> and all other browsers are not. Any help here would be appreciated. I am getting the error </p>
  
  <pre><code>SCRIPT438: Object doesn't support property or method 'remove'
  </code></pre>
  
  <p>from the error console. The Javascript works in all other browsers.<br>
  Here is the code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;&lt;!--
  function removeModule() {
  
      &lt;?php $tab = 1; ?&gt;
      var module_row = &lt;?php echo $module_row; ?&gt;;
  
      if(!confirm('Are you sure?'))
      {
          return false;
      }
  
          var x = 1;
          while (x &lt; module_row)
          {
              if (document.getElementById('tab-' + x).checked)
              {           
                  document.getElementById('tab-' + x).remove();
                  document.getElementById('module-' + x).remove();
                  document.getElementById('tab-module-' + x).remove();
              }
              x++;
              &lt;?php $tab++; ?&gt;
          }
          $('#form').submit();
  
  }
  //--&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is from an opencart module, it is the tpl file. I've included part of the file here as well so hopefully someone can spot whatever the error is.</p>
  
  <pre><code>&lt;?php echo $header; ?&gt;
  &lt;div id="content"&gt;
      &lt;div class="breadcrumb"&gt;
          &lt;?php foreach ($breadcrumbs as $breadcrumb) { ?&gt;
              &lt;?php echo $breadcrumb['separator']; ?&gt;&lt;a href="&lt;?php echo $breadcrumb['href']; ?&gt;"&gt;&lt;?php echo $breadcrumb['text']; ?&gt;&lt;/a&gt;
          &lt;?php } ?&gt;
      &lt;/div&gt;
      &lt;?php if ($error_warning) { ?&gt;
          &lt;div class="warning"&gt;&lt;?php echo $error_warning; ?&gt;&lt;/div&gt;
      &lt;?php } ?&gt;
      &lt;div class="box"&gt;
      &lt;div class="heading"&gt;
          &lt;h1&gt;&lt;img src="view/image/module.png" alt="" /&gt; &lt;?php echo $heading_title; ?&gt;&lt;/h1&gt;
          &lt;div class="buttons"&gt;
              &lt;a onclick="$('#form').submit();" class="button"&gt;&lt;?php echo $button_save; ?&gt;&lt;/a&gt;
  
              &lt;a onclick="removeModule();" class="button"&gt;&lt;?php echo $button_delete ?&gt;&lt;/a&gt;            
  
              &lt;a onclick="location = '&lt;?php echo $cancel; ?&gt;';" class="button"&gt;&lt;?php echo $button_cancel; ?&gt;&lt;/a&gt;&lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="content"&gt;
              &lt;form action="&lt;?php echo $action; ?&gt;" method="post" enctype="multipart/form-data" id="form"&gt;
              &lt;div class="vtabsQS"&gt;
                  &lt;?php $module_row = 1; ?&gt;               
                  &lt;?php foreach ($modules as $module) 
                  {  ?&gt;
                  &lt;div style="margin-left: -7px; float:left;"&gt;
                      &lt;input type="checkbox" style="float: left; margin-top: 8px;" id="tab-&lt;?php echo $module_row; ?&gt;" onClick="" value="#tab-&lt;?php echo $module_row; ?&gt;"  /&gt;                 
                      &lt;a href="#tab-module-&lt;?php echo $module_row; ?&gt;" id="module-&lt;?php echo $module_row; ?&gt;"&gt;
                          &lt;?php foreach ($languages as $language) 
                          { ?&gt; 
                              &lt;label class="inputLrgTab"&gt;&lt;?php if (!empty($module['language_id'][$language['language_id']])) { echo $module['language_id'][$language['language_id']];} ?&gt;&lt;/label&gt; 
                          &lt;?php } ?&gt;                                      
                      &lt;/a&gt;&lt;br /&gt;          
                  &lt;/div&gt;              
                  &lt;?php $module_row++; ?&gt;
                  &lt;?php } ?&gt;
                  &lt;span id="module-add" style="clear: both; margin-left: -7px;"&gt;&lt;?php echo $button_add_module; ?&gt;&amp;nbsp;&lt;img src="view/image/add.png" alt="" onclick="addModule();" /&gt;&lt;/span&gt;
              &lt;/div&gt;          
  
  
          &lt;?php $module_row = 1; ?&gt;
          &lt;?php foreach ($modules as $module) { ?&gt;
          &lt;div id="tab-module-&lt;?php echo $module_row; ?&gt;" class="vtabs-content" style="margin-left:230px;"&gt;
            &lt;table class="form"&gt;
              &lt;tr&gt;
                &lt;td&gt;&lt;?php echo $entry_title; ?&gt;&lt;/td&gt;
                &lt;td class="left"&gt;
                  &lt;?php foreach ($languages as $language) { ?&gt;
                  &lt;img src="view/image/flags/&lt;?php echo $language['image']; ?&gt;" alt="&lt;?php echo $language['name']; ?&gt;" /&gt;
                  &lt;input class="inputLrg" type="text" name="&lt;?php echo $classname; ?&gt;_module[&lt;?php echo $module_row; ?&gt;][language_id][&lt;?php echo $language['language_id']; ?&gt;]" value="&lt;?php if (!empty($module['language_id'][$language['language_id']])) { echo $module['language_id'][$language['language_id']];} ?&gt;"&gt;
                  &lt;br /&gt;
                  &lt;?php } ?&gt;
                  &lt;span class="error"&gt;&lt;?php echo $error_title; ?&gt;&lt;/span&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;td&gt;&lt;?php echo $entry_limit; ?&gt;&lt;/td&gt;
  </code></pre>