print table with vb and javascript
<p>i am trying to print a table but i am stuck.</p>

<p>table name : grid 2, using asp.net &amp; vb</p>

<p>this is my code for it but i made sth wrong so it opens a page with 404.</p>

<pre><code>function printTable() {

    var printContent = document.getElementById("grid2");
    var windowUrl = 'about:blank';
    var num;
    var uniqueName = new Date();
    var windowName = 'Print' + uniqueName.getTime(); var printWindow = window.open(num, windowName, 'left=50000,top=50000,width=0,height=0');
    printWindow.document.write(printContent.innerHTML);
    printWindow.document.close();
    printWindow.focus();
    printWindow.print();
    printWindow.close();
}


   &lt;p&gt;&lt;input type="button" value="Yazdır" onClick="printTable();"&gt;&lt;/p&gt;
</code></pre>
