Torna al Thread

function PrintPreview(ObjToPrint) { // la funzione accetta un oggetto contenitore per stamparlo con le caratteristiche di stile già presenti nell'oggetto var myVar = document.getElementById(ObjToPrint).innerHTML; myWin = window.open("","print_window","status=1,toolbar=1,height=400,width=600,menubar=1"); myWin.blur(); // to remove focus from an object myWin.document.write('<html><head>'); myWin.document.write('<link rel="stylesheet" type="text/css" media="print" href="StilePrint.css"/>'); myWin.document.write('</head><body>'); myWin.document.write(myVar); myWin.document.write('</body></html>'); myWin.print(); myWin.document.close(); //myWin.close(); }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5