title: Remove items from a list by innerHTML in JavaScript
body: <p>I'm new here and I'm stuck in my project...</p>
  
  <p>I need exclude items from a cart on an ecommerce...</p>
  
  <p>This cart is showed inside a iframe from Fancybox.</p>
  
  <p>It works, but visually in Chrome, it doesn't. In Firefox and IE it's work fine...</p>
  
  <p>I have my items in divs named like div_1, div_2, div_3...</p>
  
  <pre><code>&lt;div id="div_1"&gt;
     content...
  &lt;/div&gt;
  &lt;div id="div_2&gt;
     content...
  &lt;/div&gt;
  &lt;div id="div_3&gt;
     content...
  &lt;/div&gt;
  </code></pre>
  
  <p>To scroll the page, I put all content inside a main div with style.</p>
  
  <pre><code>style="overflow: hidden; width:820px; height:auto;"
  </code></pre>
  
  <p>Because the scroll is controled by the iframe(auto) and my main div there is defined value of widht, and height is auto to fit with my content...</p>
  
  <p>Inside the divs, I have a img from product, name, price and a remove button with this JS:-</p>
  
  <pre><code>onClick="removeItem(&lt;%=arrayIndexdiv%&gt;)"
  </code></pre>
  
  <p>And the function:-</p>
  
  <pre><code>&lt;script&gt;
      function removeItem( itemid ) {
          document.getElementById('div_' + itemid ).innerHTML = "";
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>In other words, the funcion simply erase the div, excluding them from the page...</p>
  
  <p>When my list itens is bigger than the iframe size, the vert scrollbar appears.</p>
  
  <p>When I click on remove, the iten is gonne corretly, in all brownsers, but in Chrome, the size of iframe not change, and I have a blank space above all my items, before the footer.</p>
  
  <p>In IE and Mozilla it's ok, the space doesn't appears, but in Chrome it is there...</p>
  
  <p>I don't know if I can put here the URL to help more? If I can, please tell me!</p>
  
  <p>Can anyone help me?</p>
  
  <p>Sorry my english!</p>
  
  <p>Thank you GUYS!</p>