title: Uncaught TypeError: window.reload is not a function
body: <p>I am trying to print an image from inside a div, the code runs ok but when the print dialog pops up, I would like the page to stay the same while actually it is showing only the picture as the <code>window.reload</code> doesn't work for some reasons. The javascript is telling me in console <code>"Uncaught TypeError: window.reload is not a function"</code>but i don't understand why.</p>
  
  <pre><code>  function printDiv(printableArea) {
      var printContents = document.getElementById("printableArea").innerHTML;
      var originalContents = document.body.innerHTML;
      document.body.innerHTML = printContents;
      window.print();
      window.close();
      window.reload();
    }
  </code></pre>
  
  <p>Click to print</p>
  
  <pre><code>&lt;input type="button" onclick="printDiv('printableArea')" value="print a div!" /&gt;
  </code></pre>