title: Window.print doesn't work in IE
body: <p>I have to print out a <code>div</code> which I'm doing in the following way:</p>
  
  <pre><code>function PrintElem(elem)
      {
          Popup(elem.html());
      }
  
      function Popup(data) 
      {
          var mywindow = window.open('', 'to print', 'height=600,width=800');
          mywindow.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;&lt;/title&gt;');
          mywindow.document.write('&lt;link rel="stylesheet" href="css/mycss.css" type="text/css" /&gt;');
          mywindow.document.write('&lt;/head&gt;&lt;body &gt;');
          mywindow.document.write(data);
          mywindow.document.write('&lt;/body&gt;&lt;/html&gt;');
  
          mywindow.print();
          mywindow.close();
  
          return true;
      }
  </code></pre>
  
  <p>My problem is that on IE, when I click the button nothing happens. However, on Chrome and Firefox it works. What can I do to print it out correctly?</p>
  
  <p><strong>EDIT:</strong> I'm call <code>print</code> in the following way:</p>
  
  <pre><code>$('#print_it').click(function(){
      var element = $('#itinerario');
      PrintElem(element);
  });
  </code></pre>
  
  <p>This is where <code>print_it</code> is the id of the button. </p>
  
  <p>Another thing I've seen is that after a period of time, Chrome along with other browsers tells me that the page isn't responding. Why is this happening?</p>