title: asp.net opera print dialog
body: <p>in javascript the following code does not bring up the actual print dialog. The new window opens ok but no print dialog. IE/Chrome/mozilla are all fine.
  Ive read all the usual timeout issues with opera and have tried i believe all possibilities of a solution.</p>
  
  <p>Anyone have any idea what the solution is?</p>
  
  <pre><code>var windowUrl = 'about:blank';
  var UserLoggedIn = $("#lblUser").text()
  var now = new Date();
  var strDateTime = [
      [AddZero(now.getDate()), AddZero(now.getMonth() + 1), now.getFullYear()].join("/"), [AddZero(now.getHours()), AddZero(now.getMinutes())].join(":"), now.getHours() &gt;= 12 ? "PM" : "AM"].join(" ");
  var Database = 'ProductionDatabase';
  var windowName = 'Report';
  var AuditPrintDetailEverypage = UserLoggedIn + ' Time : ' + strDateTime;
  var AuditPrintDetailLastPage = '      Report ' + ' Source Database: ';
  var WinPrint = window.open(windowUrl, windowName, 'left=300,top=300,right=500,bottom=500,width=1000,height=500,scrollbars=1');
  WinPrint.document.write('&lt;' + 'html' + '&gt;&lt;head&gt;&lt;link href="assets/css/Print.css" rel="stylesheet" type="text/css" /&gt;&lt;title&gt;' + AuditPrintDetailEverypage + '&lt;/title&gt; &lt;/head&gt;&lt;' + 'body  style="background:none !important"' + '&gt;');
  WinPrint.document.write(printContent.innerHTML);
  WinPrint.document.write('          ' + AuditPrintDetailLastPage);
  WinPrint.document.write('&lt;' + '/body' + '&gt;&lt;' + '/html' + '&gt;');
  WinPrint.document.close();
  
  if (window.opera) {
      window.onload = function () {
          window.setTimeout(function () {
              window.print;
          }, 500);
      }
  } else {
      WinPrint.focus();
      WinPrint.print();
      WinPrint.close();
  }
  </code></pre>