I have this in my css
@media print {
body * { visibility: hidden; }
.printable * { visibility: visible; }
.printable{ display: block; }
}
And this one in view
<div class="printable">
<div id="reciept_header">
</div>
<table id="items_table">
<thead>
<tr><td>Qty</td><td>Description</td><td>Price</td><td>Discount</td><td>Total</td></tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr><td colspan="4" class="right">Sub-Total:</td><td></td></tr>
<tr><td colspan="4" class="right">Discount:</td><td></td></tr>
<tr><td colspan="4" class="right">Grand Total:</td><td></td></tr>
</tfoot>
</table>
</div>
And onclick “Print” Button
window_1.button("print").attachEvent("onClick", function(){
setTimeout(function() {
window.print();
}, 500);
});
The problem is, my grid is blocked maybe because of the window. But I’ve already set everything in the body to be hiddden. Why is the window blocking my grid?