Go to DotNetFunda.com
 Online : 620 |  Welcome, Guest!   Login
 
Home > Articles > .NET Framework > Printing part of the page

  • Download the OOPS, ASP.NET and ADO.NET online training sessions videos and related document for FREE, click here.

Submit Article | Articles Home | Search Articles |

Printing part of the page

 Posted on: 11/21/2008 11:04:06 PM by Patidar.shekhar | Views: 1074 | Category: .NET Framework | Level: Beginner | Print Article
Printing part of the page.

.NET Training Videos!
Buy online comprehensive training video pack just for $35.00 only, see what's inside it.

function printPartOfPage(Div)
{


 var printContent = document.getElementById(Div);
 
 var windowUrl = 'about:blank';
 var uniqueName = new Date();
 var windowName = 'Print' + uniqueName.getTime();
 var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');

 //document.getElementById("button").style.visibility="hidden";

 printWindow.document.write(document.getElementById("table").innerHTML);
 printWindow.document.write(printContent.innerHTML);
 printWindow.document.close();
 printWindow.focus();
 printWindow.print();
 printWindow.close();
 
 document.getElementById("button").style.visibility="visible";

 return false;


}


If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Interesting?   Share and Bookmark this kick it on DotNetKicks.com


Experience:1 year(s)
Home page:http://www.dotnetfunda.com
Member since:Thursday, September 25, 2008
Level:Starter
Status: [Member]
Biography:
 Latest post(s) from Patidar.shekhar

   ◘ Printing part of the page posted on 11/21/2008 11:04:06 PM
   ◘ Sending Page contents through mail in ASP.NET posted on 11/15/2008 2:22:32 AM
   ◘ Transaction in SQL Server posted on 11/13/2008 5:15:05 AM


Submit Article

About Us | The Team | Advertise | Contact Us | Feedback | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found copied contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
All rights reserved to DotNetFunda.Com. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
(Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher)