<script language="javascript" type="text/javascript">
function PrintThisPage() {
var sOption = "toolbar=no,location=no,directories=yes,menubar=no,";
sOption += "scrollbars=yes,width=750,height=600,left=100,top=25";
var sWinHTML = document.getElementById('printcontent').innerHTML;
var winprint = window.open("", "", sOption);
winprint.document.open();
winprint.document.write('<html><LINK href=\'Includes/Css/style.css\' rel=Stylesheet><body>');
winprint.document.write('<br/><a href=\'javascript:window.print();\'>Print</a>');
winprint.document.write(sWinHTML);
winprint.document.write('<br/><a href=\'javascript:window.print();\'>Print</a>');
winprint.document.write('</body></html>');
winprint.document.close();
var oAvail = winprint.document.getElementById('divAvail')
if (oAvail != null) {
oAvail.style.overflow = "visible";
}
winprint.focus();
}
function PrintThisPage() {
var sOption = "toolbar=no,location=no,directories=yes,menubar=no,";
sOption += "scrollbars=yes,width=750,height=600,left=100,top=25";
var sWinHTML = document.getElementById('printcontent').innerHTML;
var winprint = window.open("", "", sOption);
winprint.document.open();
winprint.document.write('<html><LINK href=\'Includes/Css/style.css\' rel=Stylesheet><body>');
winprint.document.write('<br/><a href=\'javascript:window.print();\'>Print</a>');
winprint.document.write(sWinHTML);
winprint.document.write('<br/><a href=\'javascript:window.print();\'>Print</a>');
winprint.document.write('</body></html>');
winprint.document.close();
var oAvail = winprint.document.getElementById('divAvail')
if (oAvail != null) {
oAvail.style.overflow = "visible";
}
winprint.focus();
}
</script>
<div id="printcontent" style="width: 100%">This content will be opened in a new window </div>
<asp:ImageButton ID="btnPrint" runat="server" ImageUrl="~/Includes/Images/printerIcon.gif"
AlternateText="Print" CausesValidation="false" OnClientClick="javascript:PrintThisPage();" />
AlternateText="Print" CausesValidation="false" OnClientClick="javascript:PrintThisPage();" />
No comments:
Post a Comment