Open a new window in pop up with print option


Call the below function in the OnClientClick of the button.

<script language="javascript">
function Clickheretoprint()
{
  var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
      disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25";
  var content_vlue = document.getElementById("print_content").innerHTML;
 
  var docprint=window.open("","",disp_setting);
   docprint.document.open();
   docprint.document.write('<html><head><title>Home Page</title>');
   docprint.document.write('</head><body onLoad="self.print()"><center>');        
   docprint.document.write(content_vlue);        
   docprint.document.write('</center></body></html>');
   docprint.document.close();
   docprint.focus();
}
</script>

Comments